#1   Report Post  
Posted to microsoft.public.excel.misc
seantera
 
Posts: n/a
Default "Comment" help


How can I make all of the comments on a single worksheet a different
font?


--
seantera
------------------------------------------------------------------------
seantera's Profile: http://www.excelforum.com/member.php...o&userid=27294
View this thread: http://www.excelforum.com/showthread...hreadid=518893

  #2   Report Post  
Posted to microsoft.public.excel.misc
Ken Johnson
 
Posts: n/a
Default "Comment" help

Hi seantera,

This worked for me.
It changes all the sheet1 comment's font to Times Roman

Dim i As Long
For i = 1 To Sheet1.Comments.Count
Sheet1.Comments(i).Shape.TextFrame.Characters.Font .Name = "Times
Roman"
Next
End Sub

Ken Johnson

  #3   Report Post  
Posted to microsoft.public.excel.misc
Ken Johnson
 
Posts: n/a
Default "Comment" help

Hi seantera,
Sorry, I didn't copy the macro heading, and the broken line could cause
a problem, so try...

Sub ChangeCommentFont()
Dim i As Long
For i = 1 To Sheet1.Comments.Count
Sheet1.Comments(i).Shape.TextFrame.Characters.Font .Name _
= "Times Roman"
Next
End Sub

Ken Johnson

  #4   Report Post  
Posted to microsoft.public.excel.misc
Ken Johnson
 
Posts: n/a
Default "Comment" help

Me again,

It would have been more sensible of me to have used ActiveSheet rather
than Sheet1, so try...

Sub ChangeCommentFont()
Dim i As Long
For i = 1 To ActiveSheet.Comments.Count
ActiveSheet.Comments(i).Shape.TextFrame.Characters .Font.Name _
= "Times Roman"
Next
End Sub

Ken Johnson

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"