ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Input for Macros (https://www.excelbanter.com/excel-programming/349005-re-input-macros.html)

bpeltzer

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?



All times are GMT +1. The time now is 05:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com