LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Macro for wrapping text

You have a choice. WrapText will increase the height of a cell to fit the
text in, and AutoFit will increase the width of the cell to fit it in. With
WrapText you can preset the width of the column to have some control over how
man lines actually wrap. You can apply it to a single cell or multiple cells
in a range.
Here is some sample Syntax:
ActiveSheet.Column("B").AutoFit
ActiveSheet.Range("B2").WrapText = True

For more detail refer to the VBA help file in the VB editor.

"suestew" wrote:

I need to wrap text in only those cells where the text won't fit on the
printed page. Here is how I see it.

If the text of a cell extends beyond 15 inches(arbitrary length) (or beyond
Column BD) then wrap it to fit within one cell.


 
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
How do I prevent a long string of text from wrapping in a text fil stevekaz21 Excel Discussion (Misc queries) 1 October 23rd 09 03:46 PM
text wrapping when text is pasted in excel psipg Excel Discussion (Misc queries) 2 December 5th 06 07:25 PM
Issues with wrapping Excel text macro JD2 Excel Programming 0 November 1st 06 05:08 AM
I am using wrap text in excel, so why isn't all my text wrapping? GatorDawg123 Excel Discussion (Misc queries) 2 May 6th 06 05:52 PM
Text Wrapping RhondaRoo Excel Worksheet Functions 0 February 18th 06 02:36 AM


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