#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default Autofit

My user enter text into a form which (text) is later placed in an excel
sheet. The cell where the text is placed is basically a merged cell of four
cells: A1, B1,C1,D1. If the text length fits into the four cells, all the
text is visible. If the text length does not fit into the four cells, part of
the text is not visible: excel creates another line of text in the same cell;
this line becomes visible if my user increases the height of the row (row1)

How can I fix the above issue? I do not wish my users to be manually
increasing the height of the row to view the whole text

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Autofit

Try

Range("A1:D1").Rows.AutoFit

If this post helps click Yes
---------------
Jacob Skaria


"Jess" wrote:

My user enter text into a form which (text) is later placed in an excel
sheet. The cell where the text is placed is basically a merged cell of four
cells: A1, B1,C1,D1. If the text length fits into the four cells, all the
text is visible. If the text length does not fit into the four cells, part of
the text is not visible: excel creates another line of text in the same cell;
this line becomes visible if my user increases the height of the row (row1)

How can I fix the above issue? I do not wish my users to be manually
increasing the height of the row to view the whole text

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Autofit

Merged cells will prevent the row autofitting and must be dealt with through
the use of event code behind the worksheet.

For worksheet event code...............

See google search thread for code by Greg Wilson. Watch out for word wrap
in the URL which all one line.

http://groups.google.com/group/micro...1c160cbeb27874


Gord Dibben MS Excel MVP

On Thu, 24 Sep 2009 11:25:01 -0700, Jess
wrote:

My user enter text into a form which (text) is later placed in an excel
sheet. The cell where the text is placed is basically a merged cell of four
cells: A1, B1,C1,D1. If the text length fits into the four cells, all the
text is visible. If the text length does not fit into the four cells, part of
the text is not visible: excel creates another line of text in the same cell;
this line becomes visible if my user increases the height of the row (row1)

How can I fix the above issue? I do not wish my users to be manually
increasing the height of the row to view the whole text

Thanks


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
Autofit Maxine Excel Discussion (Misc queries) 2 April 22nd 10 12:50 PM
Autofit (Columns.EntireColumn.AutoFit) does not work Michiel via OfficeKB.com Excel Discussion (Misc queries) 3 February 10th 09 05:29 PM
autofit Elena Excel Programming 3 May 22nd 06 05:48 PM
Autofit ? Stuart[_21_] Excel Programming 0 April 26th 05 08:56 PM
row autofit Robin Hammond Excel Programming 0 September 6th 03 02:33 AM


All times are GMT +1. The time now is 08:01 AM.

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"