Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default stupid textbox

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default stupid textbox

1) If you are accessing it from a form, have you set the
ControlSource value for the textbox. This is where the
string will go.
2) You probably want to use the Exit event rather than
the Change event since it activates when you finished
entering data
-----Original 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
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
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



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
Calculate Textbox value based on another textbox value.doc Tdungate Excel Discussion (Misc queries) 1 February 12th 09 07:11 PM
Calculate Textbox value based on another textbox value Tdungate Excel Discussion (Misc queries) 0 February 12th 09 07:03 PM
Stupid bmoag New Users to Excel 1 November 15th 08 06:28 PM
Stupid Karine Excel Worksheet Functions 0 May 29th 05 09:56 AM
UserForm TextBox to ActiveSheet TextBox over 256 characters Dan E[_2_] Excel Programming 1 July 28th 03 07:36 PM


All times are GMT +1. The time now is 08:26 PM.

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"