有没有一种方法可以触发“跟踪更改"?通过Excel中的VBA? [英] Is there a way to trigger "track changes" through VBA in Excel?

查看:238
本文介绍了有没有一种方法可以触发“跟踪更改"?通过Excel中的VBA?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望从VBA中启动/停止Excel中的跟踪更改"功能.

I want from VBA to start/stop "Track changes" functionality in Excel.

通过网络搜索,我看到了一个名为ActiveDocument对象的TrackRevisions属性.假设在MS Word编写中,ActiveDocument.TrackRevisions = True应该打开跟踪更改".

Searching thru the Net I saw a property called TrackRevisions of ActiveDocument object. Supposedly in MS Word writing ActiveDocument.TrackRevisions = True should turn on "Track changes".

但是在MS Excel中,此行给出424 Object required运行时错误.尝试使用ThisWorkbook时,将返回相同的错误.将其更改为ActiveSheet会导致438 Object doesn't support this property or method错误.

But in MS Excel this line gives 424 Object required run-time error. Same error is returned when trying with ThisWorkbook. Changing it to ActiveSheet brings 438 Object doesn't support this property or method error.

推荐答案

对于

  • HighlightChangesOptions方法Excel 2003 VBA语言参考
  • Workbook.HighlightChangesOptions方法 Office 2007
  • Workbook.HighlightChangesOptions方法(Excel) Office 2010
  • 不能提供与Word中相同的跟踪深度,例如,从我帖子中的第一个链接(在Excel中)开始

    This doesn't offer the same depth of tracking as available in Word, for example from the first link in my post,in Excel:

    1. 更改跟踪不同于撤消和备份
    2. 未跟踪某些类型的更改,但已跟踪对单元格内容所做的更改,但未跟踪其他更改,例如格式更改.
    3. 更改历史记录仅保留特定的时间间隔
    4. 更改历史记录会定期删除

    如果这不是您要追求的目标,则可以使用特定的VBA进行跟踪

    If that isn't what you were chasing you may be able to employ specific VBA to track

    1. 某些细胞,或
    2. 比较版本

    如果是这种情况,我们将需要您提供更多有关您所追逐的信息.

    But if that is the case we will need more information from you as to what you are chasing.

    这篇关于有没有一种方法可以触发“跟踪更改"?通过Excel中的VBA?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆