Start up macro to get a number from user

P

PaulB

In the old days I used to use \0 macros and {GETNUMBER} or {GETLABEL} in
Lotus to get a number from a user having asked a question like "Please input
Month number for report" and it would put a number into a cell to drive
indexes and Vlookup and hlookup tables.

Any one have any ideas on how to do this in VBA please - this is a dark
street for me!

Thanks

Paul
 
A

Alan

In it's simplest form ...

Sub AskUser()

Range("A1").Value = InputBox("Please input month number for report")

End Sub
 
A

Alan

To update automatically on opening the file ...

Sub Auto_Open()

Range("A1").Value = InputBox("Please input month number for report")

End Sub
 
P

PaulB

Thanks for that Alan.

But being a complete novice at this new way of doing macros - where do I
write this please?

Thanks

Paul
 

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