J
JJ
I have created a function that allows me to see a change everytime there is a
change on the worksheet. A comment box will appear and continue to append the
changes, unlike the "track changes function". I can not seem to figure out
why my comment box will not autosize......I have attached my code. Does
anyone know what I am doing wrong?
Function Worksheet_Change(ByVal Target1 As Excel.range)
With activecell.Offset(0, 0).range("A1")
On Error Resume Next
oldtext = .Comment.Text
If Err <> 0 Then .AddComment
newtext = oldtext & "Changed to " & .Text & _
" by " & Application.UserName & " at " & Now & vbLf
.Comment.Text newtext
.Comment.Visible = True
.Comment.Shape.Select True
.autosize = True
.Comment.Visible = True
End With
End Function
change on the worksheet. A comment box will appear and continue to append the
changes, unlike the "track changes function". I can not seem to figure out
why my comment box will not autosize......I have attached my code. Does
anyone know what I am doing wrong?
Function Worksheet_Change(ByVal Target1 As Excel.range)
With activecell.Offset(0, 0).range("A1")
On Error Resume Next
oldtext = .Comment.Text
If Err <> 0 Then .AddComment
newtext = oldtext & "Changed to " & .Text & _
" by " & Application.UserName & " at " & Now & vbLf
.Comment.Text newtext
.Comment.Visible = True
.Comment.Shape.Select True
.autosize = True
.Comment.Visible = True
End With
End Function