![]() |
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. |
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. |
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 |
All times are GMT +1. The time now is 04:54 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com