A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

macro: merge, wrap text, left justify and auto-fit



 
 
Thread Tools Display Modes
  #1  
Old February 12th, 2004, 07:01 PM
external usenet poster
 
Posts: n/a
Default 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

Ads
  #2  
Old February 12th, 2004, 09:54 PM
Popandopolo
external usenet poster
 
Posts: n/a
Default 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  
Old February 12th, 2004, 10:34 PM
Gord Dibben
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:41 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright 2004-2020 OfficeFrustration.
The comments are property of their posters.