Cell Comment
"Neil" wrote in news:4b8901c48057$49229610
:
I want to add a comment from VBA to a cell, I have
recorded the addcomment part but it falls over fi there
is alreadya comment in place, how do I checkto see if the
cell already has a comment, then append the new comment
to the old Comment ?
Neil,
Got this from a website, may/maynot help you.
Sub CommentAddOrEditTNR()
'adds TimesNewRoman 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:=""
Set cmt = ActiveCell.Comment
With cmt.Shape.TextFrame.Characters.Font
.Name = "Times New Roman"
.Size = 11
.Bold = False
.ColorIndex = 0
End With
End If
SendKeys "%ie~"
End Sub
|