View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
bpeltzer bpeltzer is offline
external usenet poster
 
Posts: 180
Default Input for Macros

Sub test()
Dim instring
instring = InputBox("What's the input?")
MsgBox ("You entered " & instring)
End Sub

Depending on your intended use, you'll probably add some tests to validate
the input for type, range, etc.
--Bruce

"Sean H" wrote:

Hi,

I am trying to write a macro that will be used to update a file. I want to
have some sort of stored input like you can in C++.

something like
input "what year is it?"
input a

...or however the C code goes (its been a couple years).

Is there any way to do this for an excel macro?