Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 211
Default Getting paragraphs of text into a textbox control

I have a textbox control on a user form that needs to contain several
paragraphs of text. I have these paragraphs in a rich text file edited and
saved in Word. I would rather not do this in VBA code, because the text
never changes and really should be permanently stored with the textbox. Two
years ago I somehow was able to get all these paragraphs of text into the
textbox control, and I did so without using VBA code and without typing the
text into the text slot of the textbox's property window in VBA, which anyway
will not take carriage returns. It does not work to copy the text from the
rich text file to the clipboard and paste into the text slot in the property
window - only text up to the first carriage return is pasted.

Any suggestions?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default Getting paragraphs of text into a textbox control

Gordon

You could swap the Textbox for a RichTextBox which will allow you to paste
the text from word (via the clipboard) with the carriage returns in place.

You can get the RichTextBox by rightclicking the Toolbox and selecting
Additional Controls. Check Microsoft Rich TextBox Control (version 6.0 in
Excel 2002).

Hope this helps
Rowan

"Gordon" wrote:

I have a textbox control on a user form that needs to contain several
paragraphs of text. I have these paragraphs in a rich text file edited and
saved in Word. I would rather not do this in VBA code, because the text
never changes and really should be permanently stored with the textbox. Two
years ago I somehow was able to get all these paragraphs of text into the
textbox control, and I did so without using VBA code and without typing the
text into the text slot of the textbox's property window in VBA, which anyway
will not take carriage returns. It does not work to copy the text from the
rich text file to the clipboard and paste into the text slot in the property
window - only text up to the first carriage return is pasted.

Any suggestions?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 211
Default Getting paragraphs of text into a textbox control

Thanks for the suggestion, but I have deliberately moved away from
RichTextBoxes because they make my application nonportable - users who don't
have them on their machine can't read my text boxes.

This is frustrating because I am sitting here looking at regular textbox
controls containing paragraphs of text - somehow I did this two years ago!

Gordon

"Rowan" wrote:

Gordon

You could swap the Textbox for a RichTextBox which will allow you to paste
the text from word (via the clipboard) with the carriage returns in place.

You can get the RichTextBox by rightclicking the Toolbox and selecting
Additional Controls. Check Microsoft Rich TextBox Control (version 6.0 in
Excel 2002).

Hope this helps
Rowan

"Gordon" wrote:

I have a textbox control on a user form that needs to contain several
paragraphs of text. I have these paragraphs in a rich text file edited and
saved in Word. I would rather not do this in VBA code, because the text
never changes and really should be permanently stored with the textbox. Two
years ago I somehow was able to get all these paragraphs of text into the
textbox control, and I did so without using VBA code and without typing the
text into the text slot of the textbox's property window in VBA, which anyway
will not take carriage returns. It does not work to copy the text from the
rich text file to the clipboard and paste into the text slot in the property
window - only text up to the first carriage return is pasted.

Any suggestions?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default Getting paragraphs of text into a textbox control

With the normal textbox in properties set mulitline = true. Again should let
you paste text with carriage returns.

Regards
Rowan

"Gordon" wrote:

Thanks for the suggestion, but I have deliberately moved away from
RichTextBoxes because they make my application nonportable - users who don't
have them on their machine can't read my text boxes.

This is frustrating because I am sitting here looking at regular textbox
controls containing paragraphs of text - somehow I did this two years ago!

Gordon

"Rowan" wrote:

Gordon

You could swap the Textbox for a RichTextBox which will allow you to paste
the text from word (via the clipboard) with the carriage returns in place.

You can get the RichTextBox by rightclicking the Toolbox and selecting
Additional Controls. Check Microsoft Rich TextBox Control (version 6.0 in
Excel 2002).

Hope this helps
Rowan

"Gordon" wrote:

I have a textbox control on a user form that needs to contain several
paragraphs of text. I have these paragraphs in a rich text file edited and
saved in Word. I would rather not do this in VBA code, because the text
never changes and really should be permanently stored with the textbox. Two
years ago I somehow was able to get all these paragraphs of text into the
textbox control, and I did so without using VBA code and without typing the
text into the text slot of the textbox's property window in VBA, which anyway
will not take carriage returns. It does not work to copy the text from the
rich text file to the clipboard and paste into the text slot in the property
window - only text up to the first carriage return is pasted.

Any suggestions?

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 211
Default Getting paragraphs of text into a textbox control

Thanks again, but multiline was already set to true. Pasting only pastes up
to (but not including) the first carriage return.

Gordon

"Rowan" wrote:

With the normal textbox in properties set mulitline = true. Again should let
you paste text with carriage returns.

Regards
Rowan

"Gordon" wrote:

Thanks for the suggestion, but I have deliberately moved away from
RichTextBoxes because they make my application nonportable - users who don't
have them on their machine can't read my text boxes.

This is frustrating because I am sitting here looking at regular textbox
controls containing paragraphs of text - somehow I did this two years ago!

Gordon

"Rowan" wrote:

Gordon

You could swap the Textbox for a RichTextBox which will allow you to paste
the text from word (via the clipboard) with the carriage returns in place.

You can get the RichTextBox by rightclicking the Toolbox and selecting
Additional Controls. Check Microsoft Rich TextBox Control (version 6.0 in
Excel 2002).

Hope this helps
Rowan

"Gordon" wrote:

I have a textbox control on a user form that needs to contain several
paragraphs of text. I have these paragraphs in a rich text file edited and
saved in Word. I would rather not do this in VBA code, because the text
never changes and really should be permanently stored with the textbox. Two
years ago I somehow was able to get all these paragraphs of text into the
textbox control, and I did so without using VBA code and without typing the
text into the text slot of the textbox's property window in VBA, which anyway
will not take carriage returns. It does not work to copy the text from the
rich text file to the clipboard and paste into the text slot in the property
window - only text up to the first carriage return is pasted.

Any suggestions?



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 211
Default Getting paragraphs of text into a textbox control

My apologies - I had locked the textbox. When I unlock it, it accepts
pasting with paragraphs right into the userform without needing the
properties window. I tried unlocking it before, but apparently I either
unlocked something else by mistake or failed to save the unlock - who knows?
Thanks for your help anyway.

Gordon

"Gordon" wrote:

Thanks again, but multiline was already set to true. Pasting only pastes up
to (but not including) the first carriage return.

Gordon

"Rowan" wrote:

With the normal textbox in properties set mulitline = true. Again should let
you paste text with carriage returns.

Regards
Rowan

"Gordon" wrote:

Thanks for the suggestion, but I have deliberately moved away from
RichTextBoxes because they make my application nonportable - users who don't
have them on their machine can't read my text boxes.

This is frustrating because I am sitting here looking at regular textbox
controls containing paragraphs of text - somehow I did this two years ago!

Gordon

"Rowan" wrote:

Gordon

You could swap the Textbox for a RichTextBox which will allow you to paste
the text from word (via the clipboard) with the carriage returns in place.

You can get the RichTextBox by rightclicking the Toolbox and selecting
Additional Controls. Check Microsoft Rich TextBox Control (version 6.0 in
Excel 2002).

Hope this helps
Rowan

"Gordon" wrote:

I have a textbox control on a user form that needs to contain several
paragraphs of text. I have these paragraphs in a rich text file edited and
saved in Word. I would rather not do this in VBA code, because the text
never changes and really should be permanently stored with the textbox. Two
years ago I somehow was able to get all these paragraphs of text into the
textbox control, and I did so without using VBA code and without typing the
text into the text slot of the textbox's property window in VBA, which anyway
will not take carriage returns. It does not work to copy the text from the
rich text file to the clipboard and paste into the text slot in the property
window - only text up to the first carriage return is pasted.

Any suggestions?

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
How Do I Replace Paragraphs With New Paragraphs In Excel? vselin1 Excel Discussion (Misc queries) 7 July 29th 09 04:21 PM
Legnth of text in textbox control rgarber50 Excel Discussion (Misc queries) 3 July 15th 05 02:18 PM
How to move cursor from one textbox control to another textbox con Tom Ogilvy Excel Programming 1 September 16th 04 03:42 PM
How to move cursor from one textbox control to another textbox con KMoore007 Excel Programming 0 September 16th 04 02:47 PM
Set Focus Problem for textbox control on multipage control ExcelDeveloperSPR Excel Programming 1 July 16th 04 08:54 PM


All times are GMT +1. The time now is 09:12 AM.

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"