Text wrapping problems

G

Guest

In a workbook that we are using the users enter a narrative into a userform
text box which places it in a cell on it's own worksheet. The cell is column
A and all rows merged, and text wrapping has been selected. The formatting
works correctly for the first 18 lines, then the text wrapping stops and it
just cuts off any additional text on that line. Line breaks still work, but
it will not wrap any additional text.

How can I correct this?
 
H

Harlan Grove

In a workbook that we are using the users enter a narrative into a
userform text box which places it in a cell on it's own worksheet.
The cell is column A and all rows merged, and text wrapping has been
selected. The formatting works correctly for the first 18 lines,
then the text wrapping stops and it just cuts off any additional
text on that line. Line breaks still work, but it will not wrap any
additional text.

You're almost certainly hitting Excel's approximate 1024 character limit on
how many characters it'll display in a cell if there were no embedded
newlines in the text. Your ONLY option is using VBA to embed regularly
spaced newlines (in VBA, Chr(10)) in the text box text before entering it in
the merged cells. In other words, you can't rely on word wrap.
 
G

Guest

I'm not familiar with the Chr() cmd. Would that create automatic line breaks
in the narrative, and how would that affect what the end-user sees? Do you
have a link towards a support article or website that provides more
assistance on this cmd?

Thanks,

Scott
 
H

Harlan Grove

Scott Whetsell, A.S. - WVSP wrote...
I'm not familiar with the Chr() cmd. Would that create automatic line breaks
in the narrative, and how would that affect what the end-user sees? Do you
have a link towards a support article or website that provides more
assistance on this cmd?
....

VBA online help? Chr is a function that's been part of Microsoft BASIC
all the way back to BASICA days, and I'd be willing to bet even back to
Altair BASIC.

Inserting newlines won't necessarily produce the same appearance as
word wrap, BUT it WILL allow you to display more text in a merged cell.
If you want to display more than you're seeing now, YOU HAVE NO CHOICE.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top