VBA_Newbie123
New Member
- Joined
- May 20, 2017
- Messages
- 9
Hi Team,
I have a macro that works fine that adds a comment to the cells but if there is one there already it will stop. What I was hoping to do was rather that delete the comment, could I append another comment to it rather than delete and lose the previous one? Code as below for the part i'm trying to fix;
I have a macro that works fine that adds a comment to the cells but if there is one there already it will stop. What I was hoping to do was rather that delete the comment, could I append another comment to it rather than delete and lose the previous one? Code as below for the part i'm trying to fix;
Code:
If OptionButton2.Value = True Then ActiveCell.Offset(0, 5) = "0"
ActiveCell.Offset(0, 5).Activate
ActiveCell.AddComment
ActiveCell.comment.Text Text:=Environ("username") & Chr(10) & "Zeroed" & Chr(10) & Date & Chr(10) & Time()
ActiveCell.comment.Visible = False
ActiveCell.Offset(0, 1).Activate
ActiveCell.AddComment
ActiveCell.comment.Text Text:=Environ("username") & Chr(10) & "Zeroed" & Chr(10) & Date & Chr(10) & Time()
ActiveCell.comment.Visible = False
ActiveCell.Offset(0, 0) = "0"
ActiveCell.Offset(0, 1).Activate
ActiveCell.Offset(0, 0) = "0"
ActiveCell.AddComment
ActiveCell.comment.Text Text:=Environ("username") & Chr(10) & "Zeroed" & Chr(10) & Date & Chr(10) & Time()
ActiveCell.comment.Visible = False
End If