Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 203
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 203
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Default Comment Font FBOL Excel Discussion (Misc queries) 2 February 9th 09 06:56 PM
Comment Font Mary Fetsch Excel Discussion (Misc queries) 2 February 8th 06 09:05 PM
Font in Comment Box annie Excel Worksheet Functions 2 July 29th 05 05:24 AM
How do I set default comment font Paul Matrix Excel Discussion (Misc queries) 2 December 30th 04 06:56 PM
Comment Font Size Sheldon Excel Programming 1 September 28th 04 11:04 PM


All times are GMT +1. The time now is 05:39 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"