ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Calendar Control (https://www.excelbanter.com/excel-programming/329674-calendar-control.html)

Mike S.[_3_]

Calendar Control
 
I have created a calendar control on a form in Excel and everything works
fine except for one thing. When the user selects a different month from the
drop down, I want the day to stay the same as the previous day that was
selected. I have tried several different methods, but the day remains empty
and unselected. Nothing I have tried seems to work.

Any suggestions will be appreciated.

Thank you



Ron de Bruin

Calendar Control
 
Hi Mike

No, this is not working

Do you use it on userform ?
You can make a button like this to go up 1 month (untested)

Calendar1.Value = DateSerial(Year(Calendar1.Value), Month(Calendar1.Value) + 1, Day(Calendar1.Value))

and down

Calendar1.Value = DateSerial(Year(Calendar1.Value), Month(Calendar1.Value) - 1, Day(Calendar1.Value))

In the properties you can remove the dropdowns


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Mike S." wrote in message ...
I have created a calendar control on a form in Excel and everything works fine except for one thing. When the user selects a
different month from the drop down, I want the day to stay the same as the previous day that was selected. I have tried several
different methods, but the day remains empty and unselected. Nothing I have tried seems to work.

Any suggestions will be appreciated.

Thank you





All times are GMT +1. The time now is 03:38 AM.

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