ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Comment Box Font Settings (https://www.excelbanter.com/excel-discussion-misc-queries/15887-comment-box-font-settings.html)

armenthj

Comment Box Font Settings
 
How do I complete a global change the font settings in comment boxes rather
than having to change the font in each comment box individually?

Dave Peterson

Debra Dalgleish has lots of sample code for working with comments at:
http://www.contextures.com/xlcomments03.html

I stole one version and modified it to this:

Option Explicit
Sub ChangeCommentFont()
Dim cmt As Comment
For Each cmt In ActiveSheet.Comments
With cmt.Shape.TextFrame.Characters.Font
.Name = "Times New Roman"
.Size = 11
.Bold = False
.ColorIndex = 0
End With
Next cmt
End Sub


She also has an example for adding comments using the font you want via a macro:
http://www.contextures.com/xlcomments03.html#Formatted

(That's the one I started with, too.)


armenthj wrote:

How do I complete a global change the font settings in comment boxes rather
than having to change the font in each comment box individually?


--

Dave Peterson


All times are GMT +1. The time now is 08:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com