Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim cmt As Comment
With Target
If .Address <> Cells(1, 1) Then
Set cmt = Range(Cells(1, 1)).Comment
If Not cmt Is Nothing Then
With cmt
.Text (Replace(.Text, "today", Date))
End With
End If
End If
End With
Cells(1, 1) = Target.Address
End Sub
1 回答
解决方法可能是使用“帮助器”单元格来存储最后一个选定单元格的地址,以便一旦用户完成注释并选择另一个单元格,事件处理程序将仅检查“最后”单元格
接下来的东西(我使用单元格“A1”作为“帮手”)