Thread: stupid textbox
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default stupid textbox

If the userform is loaded at startup, as long as it is loaded

In the ThisWorkbook Module
Private Sub Workbooks.Open( )

Userform1.Show
sStr = userform1.Textbox1.Value
unload userform1
End Sub

in a general module

Public sStr as String

Otherwise, it is unclear how the textbox in the userform would have a value
at startup.

--
Regards,
Tom Ogilvy



"hicks" wrote in message
...
I might be doing something really simple really wrong,
but how would I extract a string of what's been put into
a textbox on a userform at the workbook startup?

i'm currently using...
Private Sub TextBox1_Change()

... then setting string1 to be whatever's been put into
textbox1.

Could someone please help as it's driving me nuts

TIA

G. Hicks