Append to Comment

L

LSB

Hi Experts,

I would like to write a macro that can check whether the
activecell contains any comment, and if there is I would
like to append new string to the existing comment. If
there is none, then I would like to add a new comment to
the cell.

Can you experts out there help me with this?

MANY THANKS IN ADVANCE.

LSB
 
P

Paul B

Here is one way, don't remember who to give credit to for the macro

Sub CommentAddOrEdit()
'adds new plain text comment or positions
'cursor at end of existing comment text
Dim cmt As Comment
Set cmt = ActiveCell.Comment
If cmt Is Nothing Then
ActiveCell.AddComment Text:=""
End If
SendKeys "%ie~"
End Sub


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2000 & 97
** remove news from my email address to reply by email **
 
P

Paul B

Thanks Dave, I will make a note of that

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2000 & 97
** remove news from my email address to reply by email **
 
Top