Comment Font Name trouble

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
This might do it:

If .Type = msoTextEffect Then
.TextEffect.FontName = "Courier New"
End If
 
Back
Top