Using VBA to format Excel comments
Using VBA to format Excel comments
(OP)
Currently, I have a spreadsheet that puts comments on a group of cells. However, I want to change the font (size and bold) and also use the Autosize feature for the comment (textbox). I tried recording a macro and manually changing the comment properties. However, when I use the recorded code in my subroutine, I either get an error, or modify the cell properties (not the comment associated to the cell).
While searching the internet, it appears that the only way to accomplish this is to change the "Tooltip" configuration for the Windows enviornment. This seems absurd to me, and am hoping someone can point me in the right direction.
Thanks!
While searching the internet, it appears that the only way to accomplish this is to change the "Tooltip" configuration for the Windows enviornment. This seems absurd to me, and am hoping someone can point me in the right direction.
Thanks!





RE: Using VBA to format Excel comments
With Sheet4.Cells(Row, Col).AddComment
.Visible = False
.Text comment
End With
With ActiveCell.comment.Shape.TextFrame.Characters.font
.Size = Font_Size
.Bold = True
End With
With ActiveCell.comment.Shape.TextFrame
.AutoSize = True
End With
RE: Using VBA to format Excel comments
Funny enough I was just about to post a similar question - about the resizing. I'll try out your code.
Thanks
Mogens