Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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   Report Post  
Posted to microsoft.public.excel.programming
moi moi is offline
external usenet poster
 
Posts: 27
Default 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
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
Wrapping text with line breaks problem CC91884 Excel Discussion (Misc queries) 1 March 10th 09 04:33 PM
Wrapping text leaves blank line when printing [email protected] Excel Discussion (Misc queries) 1 November 19th 08 04:06 PM
No wrapping, but keep line breaks Paul Excel Discussion (Misc queries) 2 April 1st 08 10:47 PM
Newlines in csv files tshad Excel Discussion (Misc queries) 3 April 17th 07 01:19 AM
Textbox-read text line by line antonio Excel Programming 0 October 26th 04 05:42 PM


All times are GMT +1. The time now is 09:21 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"