Excel 2007 and Calender Control

Hi all

In Excel 2007 I am building an Input form.  On the input form I have inserted a Calender Control (12.0) that the user will select a date from.  In the Properties of that Calender Control I have linked it to cell C6 of my form.  However, the "Value" always comes up with either "Null" as date selected or a hard keyed date.  Is there a way to default the Calender Control date to Date() or Today().  I've tried both and it doesn't save.  It appears I can set the Calender Control Properties "ValueIsNull" to either True or False.  However if it is set to True then no date is slected and if it is False then a non dynamic date is in the field.

Any help?
wlwebbAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
wlwebbConnect With a Mentor Author Commented:
Never Mind found this:

In the Worksheet_Activate, this will set the calendar each time the sheet is activated
Code:

Option Explicit

Private Sub Worksheet_Activate()
Me.Calendar1.Value = Date
End Sub

0
 
wlwebbAuthor Commented:
see above
0
 
SiddharthRoutCommented:
Why not set the date in the userform Initialize event?

Private Sub UserForm_Initialize()
    Calendar1.Value = Date
End Sub

Open in new window


Sid
0
 
SiddharthRoutCommented:
Oops... I am late...

Sid
0
All Courses

From novice to tech pro — start learning today.