Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
User Form Formula
I have created the template for a user form at the beginning of a macro. It
simply asks the user to enter a product code and click Ok. I am not a professional programmer and am unsure how to take the information that the user inputs and store it as a variable to be repeatedly called up in my macro at various points. Can anyone help? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
User Form Formula
Your question is kind of vague so here is a very generic bit of code for you
to loo at... Public Sub GetDataFromUser() Dim strUserInput As String strUserInput = InputBox("Please enter your name.", "Name") MsgBox "Your name is " & strUserInput Call GetAddress(strUserInput) End Sub Private Sub GetAddress(ByVal UserName As String) Dim strAddress As String strAddress = InputBox("Hi, " & UserName & ". What is your address", "Address") MsgBox UserName & " lives at " & strAddress End Sub It gets the user to inut their name. That name is output and then passed to another procedure to be used some more. -- HTH... Jim Thomlinson "sbruner" wrote: I have created the template for a user form at the beginning of a macro. It simply asks the user to enter a product code and click Ok. I am not a professional programmer and am unsure how to take the information that the user inputs and store it as a variable to be repeatedly called up in my macro at various points. Can anyone help? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
User Form Formula
ans = Inputbox("Please supply a product code")
-- HTH Bob Phillips "sbruner" wrote in message ... I have created the template for a user form at the beginning of a macro. It simply asks the user to enter a product code and click Ok. I am not a professional programmer and am unsure how to take the information that the user inputs and store it as a variable to be repeatedly called up in my macro at various points. Can anyone help? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
User Form Formula
You should look up some tutorials.
Reading the codes from these projects is a good start. <single line http://support.microsoft.com/search/... orm+tutorial </single line |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I fill a cell in a user form from a selection on same form? | Excel Discussion (Misc queries) | |||
User Form Formula ? | New Users to Excel | |||
How to: User Form to assign a user defined range to a macro variab | Excel Programming | |||
I am looking to see if anybody has an equivalant user form to Outlooks CONTACT form | Excel Programming |