Tag: 跟踪用户

Excel跟踪更改VBA

用户表单和很多VBA都有很大的优势。 我有部分locking一个工作表的问题,同时允许VBA跟踪更改。 目前我使用下面的代码跟踪更改 – 此代码是坐在Microsoft Excel对象>> Sheet1: Option Explicit Public preValue As Variant Private Sub Worksheet_Change(ByVal Target As Range) If Target.Count > 1 Then Exit Sub Target.ClearComments Target.AddComment.Text Text:="Previous Value was " & preValue & Chr(10) `& "Revised " & Format(Date, "mm-dd-yyyy") & Chr(10) & "By " & Environ`("UserName") End Sub Private Sub Worksheet_SelectionChange(ByVal Target […]