Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
AB expressed precisely :
In the userform you need a button (like btnOK) that has btnOK_click event something like this: btnOK_click 'do some validation here and exit sub in case fails me.hide'Hides (as oppose to terminate/destroy) the form keeping all controls alive/available end sub Your DoStuff then would be something like this: Sub DoStuff () Dim first_name as String Dim last_name as String UserForm.Show ' Show form with text boxes 'user types the f/l names into the textboxes 'user clicks on the btnOK (that hides the form but keeps it alive) first_name=UserForm.txtbx_FName.Text'Read First Name last_name=UserForm.txtbx_FName.Text'Read Last Name Unload UserForm'Terminate the form End Sub I agree that your suggestion will work, but I don't see the point to keeping the userform loaded in memory. I whole heartedly agree with Rick on this approach even though there's any number of other ways to get this done! -- Garry Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Text "comparison" operator for "contains" used in an "IF" Function | Excel Worksheet Functions | |||
Extract text plus "n" characters or date on partial match | Excel Programming | |||
Can you Click the "Enter" key to go to the next line in a Textbox without Exiting the Textbox ? | Excel Programming | |||
Insert "-" in text "1234567890" to have a output like this"123-456-7890" | Excel Discussion (Misc queries) | |||
How do I split "A1B2" into "A1" and "B2" using text to column fun. | Excel Programming |