Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Instead of Dim'ming your variables inside the DoStuff procedure (where only
code within the DoStuff procedure can see them), put those declaration statements inside a standard module (Insert/Module from the VB editor's menu bar) using Public instead of Dim and ALL procedures in your workbook will be able to see them, in particular, your DoStuff procedure and any code in your UserForm. And once you do that, make sure you remove the Dim statements from the DoStuff procedure (if you leave them there, then those declarations will take precedence). Rick Rothstein (MVP - Excel) "Robert Crandal" wrote in message ... My code so far looks like this: '--------------------------------------------------- Sub DoStuff () Dim first_name as String Dim last_name as String UserForm.Show ' Show form with text boxes ' what goes here? End Sub '------------------------------------------------- The code that shows the userform causes a userform to be displayed which allows a user to enter text into Textbox1 and/or Textbox2. Once a user enters text into either textbox and closes out the Userform, is it possible to get the values from the textboxes and store them in the string variables above in the DoStuff() subroutine?? Thank you! Robert |
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 |