input box default values (current month, year)
am using two inboxes to query user to input a month and then a year. would
like the default values to be the current month and year, i.e., 6 for june, and 2007 for year. how can i do this? (just asking for vba for "default" argument) |
input box default values (current month, year)
I'm assuming you mean InputBoxes.
Application.InputBox "Enter Month No.","Month", Month(Now), , , , , 1 Application.InputBox "Enter Year","Year", Year(Now), , , , , 1 __________________________________________________ _______________________ "mwam423" wrote in message ... am using two inboxes to query user to input a month and then a year. would like the default values to be the current month and year, i.e., 6 for june, and 2007 for year. how can i do this? (just asking for vba for "default" argument) |
input box default values (current month, year)
Dim res As Variant
res = InputBox("What is the Year ?", , "2007") Sheet1.Range("A1") = res "mwam423" wrote in message ... am using two inboxes to query user to input a month and then a year. would like the default values to be the current month and year, i.e., 6 for june, and 2007 for year. how can i do this? (just asking for vba for "default" argument) |
input box default values (current month, year)
This won't work next year. :-)
__________________________________________________ ______________________ "Corey" wrote in message ... Dim res As Variant res = InputBox("What is the Year ?", , "2007") Sheet1.Range("A1") = res "mwam423" wrote in message ... am using two inboxes to query user to input a month and then a year. would like the default values to be the current month and year, i.e., 6 for june, and 2007 for year. how can i do this? (just asking for vba for "default" argument) |
input box default values (current month, year)
so simple! thank you, and appreciate the quick reply
"Vasant Nanavati" wrote: I'm assuming you mean InputBoxes. Application.InputBox "Enter Month No.","Month", Month(Now), , , , , 1 Application.InputBox "Enter Year","Year", Year(Now), , , , , 1 |
input box default values (current month, year)
You're most welcome. :)
__________________________________________________ ______________________ "mwam423" wrote in message ... so simple! thank you, and appreciate the quick reply "Vasant Nanavati" wrote: I'm assuming you mean InputBoxes. Application.InputBox "Enter Month No.","Month", Month(Now), , , , , 1 Application.InputBox "Enter Year","Year", Year(Now), , , , , 1 |
All times are GMT +1. The time now is 01:35 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com