![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Location: Michigan, USA
Posts: 17
|
Hi,
I used record to generate a VBA Macro to set the comment font size and color. When the Macro was generated, nothing shows up in Macro. Could you help me to generate a code in VBA to set the comment font size and color? Thank you very much. ssunchen |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Denver, Colorado USA
Posts: 4,014
|
Hi ssunchen,
Here is a sample macro that sets the font size, color and name of all comments residing in the selected cell or cells. Sub SetCommentsProperties() Dim Cell As Range For Each Cell In Selection If Not Cell.Comment Is Nothing Then With Cell.Comment.Shape.TextFrame.Characters.Font .ColorIndex = 3 .Size = 12 .Name = "Arial Black" End With End If Next Cell End Sub
__________________
Keep Excelling. Damon VBAexpert Excel Consulting (My other life: http://damonostrander.com ) |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|