View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Vasant Nanavati Vasant Nanavati is offline
external usenet poster
 
Posts: 1,080
Default Resizing Comment boxes back to default size!

Hey! I could have taken the easy way out and stolen Dave's code too! :-)

But I was curious as to why the *default* size changed and how it could be
changed back, since I've never heard of this behavior before.

--

Vasant


"Debra Dalgleish" wrote in message
...
You're welcome!

And my thanks to Dave, from whom I stole the code.

wrote:
Debra,

My appreciation for this remedy is immense and I thank you
so much for your time.

Jeff

-----Original Message-----
The following code will resize all the cells in the


selected range:

'=========================
Sub ResizeCommentsInSelection()
'Posted by Dave Peterson
'2002-02-25
Dim mycell As Range
Dim myRng As Range
Dim lArea As Long

Set myRng = Selection

For Each mycell In myRng.Cells
If Not (mycell.Comment Is Nothing) Then
With mycell.Comment
.Shape.TextFrame.AutoSize = True
If .Shape.Width 300 Then
lArea = .Shape.Width * .Shape.Height
.Shape.Width = 200
.Shape.Height = (lArea / 200) * 1.2
End If
End With
End If
Next mycell

End Sub
'=========================================

Jeff Etcell wrote:

I have a problem whereas my comment boxes resized to
nothing and moved positions. I have the position issued
rectified (with help from Paul) but need to know how to
resize my comment boxes back to a default size and I

have

over 500 on one worksheet.
Can this be done?

Thanks


--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

.




--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html