Calendar Control


Posted by Jack on September 03, 1999 10:59 AM

Chris, I hope you have a great game!!

I have now made a macro that allows the Calendar control to appear. The problem is now, how do I get the date to input into the text box?.

Thanks again for all you help!!!


Jack



Posted by Chris on September 07, 1999 6:59 AM

I shot a 98, I guess that's why I keep my day job.

It sounds like you are trying to return a value to the active sheet. Is that correct?

This code shows how to return the date to a cell on the active sheet. Add this to the Calendar's click event:

Private Sub Calendar1_Click()
Dim iDate
iDate = Calendar1.Value
Unload UserForm1
Range("A1").Value = iDate
End Sub

If you were trying to update a text box on that form, you could just use this:

TextBox1.Value = Calendar1.Value

Hope that will suffice.

Chris