Basic Input Forms

D

DLS

I'm a newbie to Excel programming and am having a problem with input
forms. I've written the following code for a form to come up when the
worksheet opens and the user must input their name and serial number.
I can't figure out nor find the answer in books as to how to save the
info, name and serial, in a spreadsheet cell for later use. The
following is as far as I've gotten and would appreciate any and all
help.
Thanks
DLS

Sub Auto_Open()
Call Macro1
End Sub
Sub Macro1()
' Macro1 Macro
' Macro recorded 7/30/2003 by DLS
'Sub Auto_Open()
MsgBox "Hello"
Call Macro2 'This calls for Macro2 to run
End Sub
Sub Macro2()
'
' Macro2 Macro
' Macro recorded 7/30/2003 by DLS
'Sub GetInput()
Dim MyInput
MyInput = InputBox("Enter your Name") + InputBox("Enter Serial
Number")
MsgBox ("Hello ") & MyInput
A1 = MyInput
End Sub
 
T

Tom Ogilvy

Sub Macro2()
'
' Macro2 Macro
' Macro recorded 7/30/2003 by DLS
Dim MyInput as String
MyInput = InputBox("Enter your Name") & " " & InputBox("Enter Serial
Number")
MsgBox ("Hello ") & MyInput
Range("A1").Value = MyInput
End Sub

Regards,
Tom Ogilvy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top