Comment Font Name trouble

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
 
G

Guest

This might do it:

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top