Anthony G.
Active Member
- Joined
- Mar 24, 2002
- Messages
- 465
Hello to all!!
I came across this handy little code to identify cell changes and it works rather well. However, if the report is being sent out to various people, can the code be adjusted to identify the "WHO" or can that only be done if the workbook is shared?
Here is the code:
Private Sub Worksheet_Change(ByVal Target As Range)
Target.Interior.ColorIndex = 8
On Error Resume Next
Dim curComment As String
curComment = ""
curComment = Target.Comment.Text
If curComment <> "" Then curComment = curComment & Chr(10)
Target.AddComment
Target.Comment.Text Text:=curComment & _
ActiveWorkbook.BuiltinDocumentProperties("Author") & _
Chr(10) & " Rev. " & Format(Date, "yyyy-mm-dd ") & _
Format(Time, "hh:mm")
'comment perhaps should be resized
End Sub
Thanks,
Anthony
I came across this handy little code to identify cell changes and it works rather well. However, if the report is being sent out to various people, can the code be adjusted to identify the "WHO" or can that only be done if the workbook is shared?
Here is the code:
Private Sub Worksheet_Change(ByVal Target As Range)
Target.Interior.ColorIndex = 8
On Error Resume Next
Dim curComment As String
curComment = ""
curComment = Target.Comment.Text
If curComment <> "" Then curComment = curComment & Chr(10)
Target.AddComment
Target.Comment.Text Text:=curComment & _
ActiveWorkbook.BuiltinDocumentProperties("Author") & _
Chr(10) & " Rev. " & Format(Date, "yyyy-mm-dd ") & _
Format(Time, "hh:mm")
'comment perhaps should be resized
End Sub
Thanks,
Anthony