If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
macro: merge, wrap text, left justify and auto-fit
I am trying to write an excel macro that merges 4 cells in
4 columns, wraps the text, left justifies and adjusts the row height so that all of the text is visible. I can get everything to work but the adjusting of the row height. The row height always adjusts to the default setting. What is the fix? Thanks, John Ammon |
#2
|
|||
|
|||
macro: merge, wrap text, left justify and auto-fit
Hi,
Rows("1:1").RowHeight = 25 Cheers, Pyzatiy Popandopolo -----Original Message----- I am trying to write an excel macro that merges 4 cells in 4 columns, wraps the text, left justifies and adjusts the row height so that all of the text is visible. I can get everything to work but the adjusting of the row height. The row height always adjusts to the default setting. What is the fix? Thanks, John Ammon . |
#3
|
|||
|
|||
macro: merge, wrap text, left justify and auto-fit
John
Merged cells will allow "wrap text" from FormatCellsAlignment but.......... Excel has a problem auto-fitting merged cells. You can resize manually or via Macro. Jim Rech has written code for this which you can incorporate into your own code. http://groups.google.com/groups?thre...%40tkmsftngp05 Note also a recent adaptation of this code by Greg Wilson. http://makeashorterlink.com/?P37D24B15 Gord Dibben Excel MVP On Thu, 12 Feb 2004 11:01:52 -0800, " wrote: I am trying to write an excel macro that merges 4 cells in 4 columns, wraps the text, left justifies and adjusts the row height so that all of the text is visible. I can get everything to work but the adjusting of the row height. The row height always adjusts to the default setting. What is the fix? Thanks, John Ammon |
Thread Tools | |
Display Modes | |
|
|