PDA

View Full Version : Adding to existing comments



Asterix
01-25-2008, 02:58 AM
Why doesn't the 3rd line work?



time_difference_text = Worksheets("Overall standings").Range(lowest_score_address).Comment.Text
comment_to_be_added = "Dropped score = " & Cells(i, lowest_score_column).Value & " / Time difference = " & time_difference_text
Worksheets("Overall standings").Range(lowest_score_address).AddComment = comment_to_be_added

lynnnow
01-25-2008, 03:30 AM
try this:

If Not Range("B3").Comment Is Nothing Then
NewText = Range("B3").Comment.Text & vbCrLf & "Hello"
Range("B3").Comment.Delete
Range("B3").AddComment NewText
End If

change the ranges though.

HTH

Lincoln

Asterix
01-25-2008, 05:00 AM
try this:

If Not Range("B3").Comment Is Nothing Then
NewText = Range("B3").Comment.Text & vbCrLf & "Hello"
Range("B3").Comment.Delete
Range("B3").AddComment NewText
End If

change the ranges though.

HTH

Lincoln

Thanks, that worked