![]() |
Calendar Control Help
I have a Calendar pop up when a cell is chosen. How can I get the Calendar
to disappear after a date is chosen (instead of having to take the extra step of clicking the Close button)? Thanks. |
Calendar Control Help
Assuming the calendar is Calendar1, put the following code:
- in the userform if the calendar is in a userform - in the sheet code module if the calendar is directly on the sheet Private Sub Calendar1_AfterUpdate() ''' close code here ''' 1. run close button: CmdClose_Click ''' 2. or close the Userform if the calendar is in userform: Me.Hide End Sub -- Regards, Sébastien <http://www.ondemandanalysis.com "Exceller" wrote: I have a Calendar pop up when a cell is chosen. How can I get the Calendar to disappear after a date is chosen (instead of having to take the extra step of clicking the Close button)? Thanks. |
Calendar Control Help
Private Sub Calendar1_Click()
' Transfer date selected on calendar to active cell ' and close UserForm. ActiveCell.Value = Format(Calendar1.Value, "dd-mmm-yy") Unload Me End Sub Gord Dibben MS Excel MVP On Tue, 27 Nov 2007 12:31:02 -0800, Exceller wrote: I have a Calendar pop up when a cell is chosen. How can I get the Calendar to disappear after a date is chosen (instead of having to take the extra step of clicking the Close button)? Thanks. |
All times are GMT +1. The time now is 07:00 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com