Excel AddComment editing font

B

BOHICA

Okay...I need to add a comment from a macro to a cell...no problem.
BUT, I need to bold the text and set font size to 14...WTF?? I cannot
figure out how to do it. The excel help is not helpful, and the good
ol .font.bold = true doesn't work. I tried to record the macro and
see how the macro would do it...but it doesn't record changes to font
except as Range("Foo").comment.text Text:="What I already typed" &
Char(10) & ""

Arrrrg!!! Anyone have any ideas?
 
C

Chip Pearson

Try something like the following:

Dim CMT As Comment
Set CMT = Range("A1").AddComment("this is some text")
With CMT.Shape.TextFrame.Characters
.Font.Size = 14
.Font.Bold = True
End With



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Top