Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there any way to copy out the text from a text box to a cell, even when
the text length is greater than 255 characters? Currently, my copy is getting truncated to the first 255 characters. thanks in advance Daniel |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It's working ok for me:
TextBox1.Value = Space(20000) Cells(1, 1).Value = TextBox1.Value Debug.Print Len(Cells(1, 1)) check the MaxLength property of your textbox. Set it to zero. "Daniel Bonallack" wrote: Is there any way to copy out the text from a text box to a cell, even when the text length is greater than 255 characters? Currently, my copy is getting truncated to the first 255 characters. thanks in advance Daniel |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Charlie,
Thanks for the solution, but I think I didn't post very clearly. I'm talking about an actual drawing object textbox, rather than a textbox in a form. Any thoughts on that? Daniel "Charlie" wrote: It's working ok for me: TextBox1.Value = Space(20000) Cells(1, 1).Value = TextBox1.Value Debug.Print Len(Cells(1, 1)) check the MaxLength property of your textbox. Set it to zero. "Daniel Bonallack" wrote: Is there any way to copy out the text from a text box to a cell, even when the text length is greater than 255 characters? Currently, my copy is getting truncated to the first 255 characters. thanks in advance Daniel |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Daniel,
Long time no hear. Try this Sub LoadCellFromTextbox() Dim tbox As Shape Dim tmp As String Dim tbLen As Long Dim i As Long Set tbox = ActiveSheet.Shapes("Text Box 1") tbLen = tbox.TextFrame.Characters.Count For i = 1 To tbLen Step 255 tmp = tmp & tbox.TextFrame.Characters(i, 255).Text Next i ActiveCell.Value = tmp End Sub -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Daniel Bonallack" wrote in message ... Hi Charlie, Thanks for the solution, but I think I didn't post very clearly. I'm talking about an actual drawing object textbox, rather than a textbox in a form. Any thoughts on that? Daniel "Charlie" wrote: It's working ok for me: TextBox1.Value = Space(20000) Cells(1, 1).Value = TextBox1.Value Debug.Print Len(Cells(1, 1)) check the MaxLength property of your textbox. Set it to zero. "Daniel Bonallack" wrote: Is there any way to copy out the text from a text box to a cell, even when the text length is greater than 255 characters? Currently, my copy is getting truncated to the first 255 characters. thanks in advance Daniel |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
copying text within a text box and losing formatting | Excel Discussion (Misc queries) | |||
Code for searching & copying Text from 1 text file to another | Excel Programming | |||
Copying text from website OR selecting and coping certain text within a cell | Excel Programming | |||
Text not copying as text from Word to Excel 2003 | Excel Discussion (Misc queries) | |||
Copying text from a text box into a cell on another sheet | Excel Programming |