ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Start up macro to get a number from user (https://www.excelbanter.com/excel-programming/374127-start-up-macro-get-number-user.html)

PaulB

Start up macro to get a number from user
 
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

Alan

Start up macro to get a number from user
 
In it's simplest form ...

Sub AskUser()

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

End Sub


PaulB wrote:
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



Alan

Start up macro to get a number from user
 
To update automatically on opening the file ...

Sub Auto_Open()

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

End Sub

Alan wrote:
In it's simplest form ...

Sub AskUser()

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

End Sub


PaulB wrote:
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



PaulB

Start up macro to get a number from user
 
Thanks for that Alan.

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

Thanks

Paul

"PaulB" wrote:

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



All times are GMT +1. The time now is 04:11 AM.

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