Solved

Excel 2007 and Calender Control

Posted on 2011-02-13
4
521 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

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

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

How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

729 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