Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calendar 9.0 Object - won't default to Todays date

Status
Not open for further replies.

GoKingBee

Technical User
Mar 5, 2004
10
CA
I am a new VBA for Excel programmer (self proclaimed). I am having trouble coding the Calendar object 9.0 to default to Today's date when the calendar is opened. I used code that forces the value of the object to equal NOW(), but this, in effect, disables the calendar object. Any date you click on results in Todays date populating the Textbox.

*sets Todays date upon opening the calendar*
Private Sub calendar1_Enter()
Me.Calendar1.Value = Now()
End Sub

*inputs the date selected
Private Sub Calendar1_Click()
Me.ChequeDate.Text = Format(Me.Calendar1.Value, "dd-mmm-yyyy")
End Sub

I am probably missing something really basic. Since I am really new at this, I am hoping for some idiot-proof help.

Thx
Bill King
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top