View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default 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