Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How Do I Replace Paragraphs With New Paragraphs In Excel? | Excel Discussion (Misc queries) | |||
Legnth of text in textbox control | Excel Discussion (Misc queries) | |||
How to move cursor from one textbox control to another textbox con | Excel Programming | |||
How to move cursor from one textbox control to another textbox con | Excel Programming | |||
Set Focus Problem for textbox control on multipage control | Excel Programming |