PC Review


Reply
Thread Tools Rate Thread

Calendar Control Help

 
 
Exceller
Guest
Posts: n/a
 
      27th Nov 2007
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 With Quote
 
 
 
 
sebastienm
Guest
Posts: n/a
 
      27th Nov 2007
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.

 
Reply With Quote
 
Gord Dibben
Guest
Posts: n/a
 
      27th Nov 2007
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
<(E-Mail Removed)> 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Selecting a date with the Calendar control clears the FileUpload control Nathan Sokalski Microsoft ASP .NET 1 11th Jan 2007 06:47 AM
Selecting a date with the Calendar control clears the FileUpload control Nathan Sokalski Microsoft VB .NET 0 11th Jan 2007 05:13 AM
Calendar Control - Subform only refreshes when I click into it after choosing date on Control acs68 Microsoft Access Form Coding 1 6th May 2005 11:47 AM
Calendar Control - Programatically set the calendar to a date range Shevek Microsoft ASP .NET 3 23rd Jun 2004 02:41 PM
Calendar control erases my upload file control data... Trint Smith Microsoft ASP .NET 2 26th Feb 2004 10:28 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:59 PM.