Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default 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   Report Post  
Posted to microsoft.public.excel.programming
jjk jjk is offline
external usenet poster
 
Posts: 42
Default 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
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
How do I fill a cell in a user form from a selection on same form? Terry Tipsy Excel Discussion (Misc queries) 4 June 11th 07 02:59 PM
User Form Formula ? mully New Users to Excel 2 July 1st 05 04:16 PM
How to: User Form to assign a user defined range to a macro variab TrevTrav Excel Programming 1 March 22nd 05 07:57 PM
I am looking to see if anybody has an equivalant user form to Outlooks CONTACT form BruceJ[_2_] Excel Programming 2 October 15th 03 05:28 PM


All times are GMT +1. The time now is 08:46 AM.

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"