Sizing Comments

  • Thread starter Thread starter Tom Ulincy
  • Start date Start date
T

Tom Ulincy

Is there a way to programmatically resize the comment
shape that is displayed? I want all of the comment to be
visible without the need to Edit the comment and manually
resize the shape. The ShapeRange.ScaleHeight method has a
scale parameter but it does not appear that the scale can
be set to auto size. Excel 2002, Win XP.

TIA
Tom
 
Tom, I have code that will do this, but I can't get at it
until tomorrow. If noone else responds, check back
tomorrow and I'll post a function here that autosizes the
comment in the activecell.
 
You can use code similar to the following:
'============================
Sub AutosizeComments()
Dim cmt As Comment
For Each cmt In ActiveSheet.Comments
cmt.Shape.TextFrame.AutoSize = True
Next
End Sub
'=========================
 
Back
Top