LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default Autosize textframe

Hi,

I have a problem of autosizing my texframe of a comment (see code below)

I set reference to the cell I want to add comment, but if text is too long,
I can't see it because the rectangle which displays the comment is too
small. Since my sheet is protected, I cannot resize the frame. I use the
autosize-property to give the comment the right size, but somethimes (most
of the times when the textframe is to small) I does not work right,
sometimes, the frame fits the comment.

When I use the procedure in a new worksheet is does the job well. Can I set
the dimensions of the comment procedurally?

Thanks
Jos Vens

set vCell = ActiveCell
vComment = "Hi there, this text is so long it doesn't fit the rectangular
comment box"

vCell.AddComment vComment
vCell.Comment.Shape.TextFrame.AutoSize = True


 
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
textframe autofit Gab Excel Discussion (Misc queries) 0 July 14th 08 12:57 AM
cell to textframe using characters object Simon Prince Excel Programming 3 February 25th 04 06:10 AM
How to modify contents of TextFrame? Robert Stober Excel Programming 7 October 14th 03 02:53 PM
Hyperlink within the TextFrame of Shape Object..? Robert Stober Excel Programming 0 October 12th 03 10:05 PM
.TextFrame.Characters.Text property readOnly in function?? VB_Help Excel Programming 1 August 27th 03 05:16 PM


All times are GMT +1. The time now is 10:23 PM.

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

About Us

"It's about Microsoft Excel"