LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
rgarber50
 
Posts: n/a
Default Legnth of text in textbox control


I would like to create a macro that:
creates a textbox
fills the textbox with the text in "A1".
Allows the user to add or edit text in the textbox
Then when exiting the textbox:
copy the text from the textbox back to "A1"

the following macro seems to work ok - except for one problem - if
there is a lot of text in "A1" it won't copy it all into the textbox.

Private Sub UserForm_Initialize()
Dim testtext
WksText = Range("A1").Text

TextBox1.Text = WksText

TextBox1.AutoSize = False

TextBox1.WordWrap = True

TextBox1.ScrollBars = 2

TextBox1.MultiLine = True

End Sub

Private Sub UserForm_Terminate()

Range("A1") = TextBox1.Text
End Sub

Anybody have any ideas. I don't want to use a scrolling textbox in the
wks because some of us use macs and the control toolbox is not
supported on the mac. Alternatively if anyone has a way of putting a
scrolling textbox on the wks without using the control toolbox - or
windows ole that would be great.

Thanks
Richard


--
rgarber50
------------------------------------------------------------------------
rgarber50's Profile: http://www.excelforum.com/member.php...o&userid=11350
View this thread: http://www.excelforum.com/showthread...hreadid=387196

 
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 search and replace text in a textbox in Excel? ToolQueen Excel Discussion (Misc queries) 2 July 7th 05 02:20 PM
Variable control tip text Steve Excel Discussion (Misc queries) 3 June 30th 05 03:48 PM
Formulas dealing with text data Bagia Excel Worksheet Functions 6 June 20th 05 10:29 PM
I have had trouble with textbox text to worksheet Thomas Excel Discussion (Misc queries) 1 March 10th 05 03:23 AM
Sort or Filter option? Mcobra41 Excel Worksheet Functions 3 February 23rd 05 07:22 PM


All times are GMT +1. The time now is 01:23 PM.

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

About Us

"It's about Microsoft Excel"