![]() |
vba object calendar start date
I have 3 object calendars. the first one is activated by a comman
button, and then the 2nd is activated by selecting a date on the firs calendar, and so on. I would like for the 1st calendar when activated to start on the current date. then the 2nd calendar a month later. and then the 3rd calendar a month later from the 2nd date. how do yo do this? thank -- Message posted from http://www.ExcelForum.com |
vba object calendar start date
Hi
Calendar1.Value = Date In the first control In the second Calendar1.Value = DateSerial(Year(Date), Month(Date) + 1, Day(Date)) in the third Calendar1.Value = DateSerial(Year(Date), Month(Date) + 2, Day(Date)) -- Regards Ron de Bruin http://www.rondebruin.nl "crew3407 " wrote in message ... I have 3 object calendars. the first one is activated by a command button, and then the 2nd is activated by selecting a date on the first calendar, and so on. I would like for the 1st calendar when activated, to start on the current date. then the 2nd calendar a month later. and then the 3rd calendar a month later from the 2nd date. how do you do this? thanks --- Message posted from http://www.ExcelForum.com/ |
vba object calendar start date
|
vba object calendar start date
sorry, one more thing. I think I might not have been clear enough, or
don't know where to put the code. when i activate the calendar, i want it to start on the current date but then i want to be able to select a different date. this date tha i select i am putting it into a cell in the sheet. sub commandbutton1_click() userform1.show end sub sub calendar1_click() range("A1").value = calendar1.value userform1.hide userform2.show end sub this is how my code looks right now, so i want to be able to set th calendar1.value initially as today's date, but then be able to chang it and have the date that i select to go into the range. Hopefull this is clear? Thanks -- Message posted from http://www.ExcelForum.com |
vba object calendar start date
See
http://www.rondebruin.nl/calendar.htm -- Regards Ron de Bruin http://www.rondebruin.nl "crew3407 " wrote in message ... sorry, one more thing. I think I might not have been clear enough, or I don't know where to put the code. when i activate the calendar, i want it to start on the current date, but then i want to be able to select a different date. this date that i select i am putting it into a cell in the sheet. sub commandbutton1_click() userform1.show end sub sub calendar1_click() range("A1").value = calendar1.value userform1.hide userform2.show end sub this is how my code looks right now, so i want to be able to set the calendar1.value initially as today's date, but then be able to change it and have the date that i select to go into the range. Hopefully this is clear? Thanks. --- Message posted from http://www.ExcelForum.com/ |
All times are GMT +1. The time now is 02:46 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com