Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 355
Default autorow height

I am trying to set the row height using Selection.Rows.AutoFit but it does
not seem to be working when there are merged cells.

Any help is appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default autorow height

That is correct. Merged cells won't autofit.

--
Regards,
Tom Ogilvy


"Sandy" wrote in message
...
I am trying to set the row height using Selection.Rows.AutoFit but it does
not seem to be working when there are merged cells.

Any help is appreciated.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 747
Default autorow height

There are two basic ways to deal with the AutoFit problem with merged cells:
1) Have a single cell in the same row offscreen that is sized the same as
the merged range that has a formula that refereces the value of the active
cell of the merged range. Therefore, this cell always holds the same value as
that entered in the merged range. Use the Worksheet SelectionChange event to
force AutoFit of this cell. Since it is in the same row as the merged range,
it fixes the problem.
2) Use more complex code fired by the SelectionChange event to effect the
AutoFit.

Regards,
Greg
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
Set a minimum row height a the same time with autofit row height Julie B New Users to Excel 2 May 5th 23 07:44 PM
Row Height stopped growing and Auot-Fit Row Height does not work PSULionRP Excel Discussion (Misc queries) 0 May 19th 09 07:59 PM
the row height should be excatly the height of the data jaggu Excel Discussion (Misc queries) 2 November 6th 08 10:30 PM
Resizing row height to dynamically fit height of text box Jon Excel Discussion (Misc queries) 1 August 8th 05 01:37 PM
Set new row height based on current height puffy Excel Programming 2 January 14th 04 12:44 AM


All times are GMT +1. The time now is 06:56 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"