Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text Does Not Always Wrap in EXCEL Cell

Status
Not open for further replies.

johr

Programmer
Apr 16, 2001
13
US
I'm writing to an Excel spreadsheet using VB. The data is SQL data type text. The cells are formatted to wrap text. Some of the text in the cell wraps as expected, while other lines do not. Any ideas what I should be investigating. We are using Excel 2000.
Thank you.
 
Have you tried using...
Code:
   Range(YourCell).EntireRow.Rows.AutoFit
Skip,
SkipAndMary1017@mindspring.com
 
Skip,
Thank you for your response. I tried it but it does not help. What I've discovered is that there is a limit to the number of characters that you can place in a cell before text wrapping fails. I've changed the code to write no more than 1000 characters to a cell and it seems to be working now. I read that 1200 characters was the max but I had it fail around 1140 characters.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top