|
Dim SelTxt$
Private Sub Worksheet_Change(ByVal Target As Range)
Dim TT$, NewTxt$
With Target
If .Count > 1 Or .Column <> 2 Or .Row < 2 Then Exit Sub
NewTxt = .Text
If NewTxt = SelTxt Then Exit Sub
SelTxt = NewTxt
If NewTxt = "" Then NewTxt = "<空白>"
TT = Format(Now, "yyyy-mm-dd hh:mm:ss_") & NewTxt & "_(by." & Application.UserName & ")"
.NoteText TT & IIf(.NoteText = "", "", vbCrLf & .NoteText)
.Comment.Shape.TextFrame.AutoSize = True
End With
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim xR As Range
With Target
If .Count = 1 And .Column = 2 And .Row > 1 Then SelTxt = .Text
End With
End Sub
1) 操作牽涉著其它問題--如複製粘貼, 多格操作, 下拉右拉--無法一一防止
2) 只能針對"單一格"處理, 在選取單元格時先取得原來內容, 有改變再記錄,
例如:原來值是123, 重新輸入123, 則不算改變單元格
3) 原來有值, 被清除了, 記錄, 並標示<空白>
測試時, 先將原有的註解清除~~
|
评分
-
1
查看全部评分
-
|