Solved

Excel 2007 and Calender Control

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now