Solved

Excel 2007 and Calender Control

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

773 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