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

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


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
Calendar Control John Excel Worksheet Functions 3 June 13th 07 08:36 AM
Calendar Control FCC[_9_] Excel Programming 3 July 2nd 06 11:37 AM
Control disappeared problem - specifically, the Calendar Control JMMach[_2_] Excel Programming 0 December 16th 05 01:53 AM
Calendar Control 11.0 MCorn Excel Discussion (Misc queries) 1 August 3rd 05 06:04 PM
Calendar Control: Can't exit design mode because control can't be created Rone Excel Programming 0 May 24th 04 04:01 PM


All times are GMT +1. The time now is 11:33 PM.

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

About Us

"It's about Microsoft Excel"