Solved

Excel 2007 and Calender Control

Posted on 2011-02-13
4
520 Views
Last Modified: 2012-06-22
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?
0
Comment
Question by:wlwebb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 

Accepted Solution

by:
wlwebb earned 0 total points
ID: 34883336
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
 

Author Closing Comment

by:wlwebb
ID: 34883341
see above
0
 
LVL 30

Expert Comment

by:SiddharthRout
ID: 34883346
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
 
LVL 30

Expert Comment

by:SiddharthRout
ID: 34883349
Oops... I am late...

Sid
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question