Hello all,
I found this handy piece of code which formats all comments on the active sheet in my workbook. However, I'd like to try to modify it in order that it only applies the formatting to the comments in the cells I had selected:
What I'm trying to achieve ultimately is two different formats for different types of comment so I'd have two separate codes but I'm really struggling with only applying to the selected cells only.![]()
Sub comments_format() Dim MyComments As Comment Dim lArea As Long For Each MyComments In ActiveSheet.Comments With MyComments .Shape.AutoShapeType = msoShapeRoundedRectangle .Shape.TextFrame.Characters.Font.Name = "Calibri" .Shape.TextFrame.Characters.Font.Size = 11 .Shape.TextFrame.Characters.Font.ColorIndex = 2 .Shape.Line.ForeColor.RGB = RGB(0, 0, 0) .Shape.Line.BackColor.RGB = RGB(255, 255, 255) .Shape.Fill.Visible = msoTrue .Shape.Fill.ForeColor.RGB = RGB(255, 0, 0) End With Next End Sub
Being a VBA novice, any assistance would be greatly appreciated!
Many thanks in advance ....
Bookmarks