Latest News

Format All Excel Comments - VBA code

Sunday, March 21, 2010 , Posted by Mohammed Ali at 11:23 PM

Once you have inserted comments in a workbook, you can change the font and font size for all comments in the workbook with the following code.


Sub FormatAllComments()
'http://daily-exceltips.blogspot.com/
Dim ws As Worksheet
Dim cmt As Comment
For Each ws In ActiveWorkbook.Worksheets
For Each cmt In ws.Comments
With cmt.Shape.TextFrame.Characters.Font
.Name = "Times New Roman"
.Size = 12
End With
Next cmt
Next ws
End Sub

Currently have 0 comments:

Leave a Reply

Post a Comment