Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 103
Default 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)
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default 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)



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 363
Default 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)


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default 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)




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 103
Default 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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Year-to-date based on current month John in Toronto Excel Discussion (Misc queries) 2 May 9th 08 04:23 PM
Default Other Than the Current Year oufan199 Excel Worksheet Functions 3 March 17th 08 12:00 AM
Default entry to year other than current livetohike Excel Discussion (Misc queries) 3 November 9th 07 02:33 PM
When typing dates do not default to current year. Spreadsheet Geek[_2_] Excel Worksheet Functions 2 October 31st 07 09:28 PM
HELP - need to returns the current number of past month this year and ... elz64 Excel Worksheet Functions 6 April 6th 05 01:37 PM


All times are GMT +1. The time now is 12:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"