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
*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