Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Newlines in a line-wrapping Textbox
Hi everyone,
Please let me know if this question has been answered already. I searched the forum, but may not have been searching for the right thing. I have a UserForm that displays a large TextBox in which the user will enter some text (usually a paragraph or so). The TextBox lines wrap correctly and everything, but I was wondering if there was a way to insert newline characters where the TextBox wraps lines. The user will format the text to their liking, but when I get the text via <Name of TextBox.Text, it's just one long String. The user could enter hard returns when they reach the end of the TextBox, but most users will tend to keep in typing and let the line wrap automatically. One solution would be to write a function that inserts a newline every 80 characters or so between words, but I'd like to preserve the user's choice of formatting. Is there any way to do this? Thanks, - Bill |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Newlines in a line-wrapping Textbox
Bill, I think if you use a RichTextBox instead of a 'normal' one, the job is
done. "Bill P" schreef in bericht oups.com... Hi everyone, Please let me know if this question has been answered already. I searched the forum, but may not have been searching for the right thing. I have a UserForm that displays a large TextBox in which the user will enter some text (usually a paragraph or so). The TextBox lines wrap correctly and everything, but I was wondering if there was a way to insert newline characters where the TextBox wraps lines. The user will format the text to their liking, but when I get the text via <Name of TextBox.Text, it's just one long String. The user could enter hard returns when they reach the end of the TextBox, but most users will tend to keep in typing and let the line wrap automatically. One solution would be to write a function that inserts a newline every 80 characters or so between words, but I'd like to preserve the user's choice of formatting. Is there any way to do this? Thanks, - Bill |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Wrapping text with line breaks problem | Excel Discussion (Misc queries) | |||
Wrapping text leaves blank line when printing | Excel Discussion (Misc queries) | |||
No wrapping, but keep line breaks | Excel Discussion (Misc queries) | |||
Newlines in csv files | Excel Discussion (Misc queries) | |||
Textbox-read text line by line | Excel Programming |