Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Comment Font Name trouble
Hi... I´m modifying all the comments in a worksheet with the following code.
Everything works fine except the Courier New Font. The font simply does not change. Give me a hand? Thanks in advance, Albert Dim MyComments As Comment Dim lArea As Long For Each MyComments In ActiveSheet.Comments With MyComments .Shape.TextFrame.AutoSize = True .Shape.TextFrame.Characters.Font.Name = "Courier New" If .Shape.Width 300 Then lArea = .Shape.Width * .Shape.Height .Shape.Width = 200 ' An adjustment factor of 1.1 seems to work ok. .Shape.Height = (lArea / 200) * 1.1 End If End With Next ' comment |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Comment Font Name trouble
This might do it:
If .Type = msoTextEffect Then .TextEffect.FontName = "Courier New" End If "Albert" wrote: Hi... I´m modifying all the comments in a worksheet with the following code. Everything works fine except the Courier New Font. The font simply does not change. Give me a hand? Thanks in advance, Albert Dim MyComments As Comment Dim lArea As Long For Each MyComments In ActiveSheet.Comments With MyComments .Shape.TextFrame.AutoSize = True .Shape.TextFrame.Characters.Font.Name = "Courier New" If .Shape.Width 300 Then lArea = .Shape.Width * .Shape.Height .Shape.Width = 200 ' An adjustment factor of 1.1 seems to work ok. .Shape.Height = (lArea / 200) * 1.1 End If End With Next ' comment |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Comment Font Name trouble
Sorry, where should I put that?
"JLGWhiz" wrote: This might do it: If .Type = msoTextEffect Then .TextEffect.FontName = "Courier New" End If "Albert" wrote: Hi... I´m modifying all the comments in a worksheet with the following code. Everything works fine except the Courier New Font. The font simply does not change. Give me a hand? Thanks in advance, Albert Dim MyComments As Comment Dim lArea As Long For Each MyComments In ActiveSheet.Comments With MyComments .Shape.TextFrame.AutoSize = True .Shape.TextFrame.Characters.Font.Name = "Courier New" If .Shape.Width 300 Then lArea = .Shape.Width * .Shape.Height .Shape.Width = 200 ' An adjustment factor of 1.1 seems to work ok. .Shape.Height = (lArea / 200) * 1.1 End If End With Next ' comment |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Default Comment Font | Excel Discussion (Misc queries) | |||
Comment Font | Excel Discussion (Misc queries) | |||
Font in Comment Box | Excel Worksheet Functions | |||
How do I set default comment font | Excel Discussion (Misc queries) | |||
Comment Font Size | Excel Programming |