I have this code which will add a comment to a specific cell (A1) however I would like to add comments to any cell modified in Column A or A1:A700. Thank in advance for the help!!
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range
Set rng = Range("A1")
On Error Resume Next
If rng.Comment Is Nothing And Len(rng.Value) > 0 Then
Target.Worksheet.Unprotect Password:="password"
rng.AddComment Now & "-" & Application.username & "-" & rng.Value
Target.Worksheet.Protect Password:="password"
Else
rng.Comment.Text vbNewLine & Now & "-" & Application.username & "-" & rng.Value, Len(rng.Comment.Text) + 1
End If
Bookmarks