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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calendar Control 2

Status
Not open for further replies.

bighavlo

Programmer
Jul 14, 2003
19
0
0
US
Does anyone know how to use the Calendar Control that comes with VB6?? Specificly how to program a reaction when a certain date is clicked?? - Thanks for the help
 
Private Sub Calendar1_Click()
If Calendar1.Value = Date Then
MsgBox "Today is " & Calendar1.Value
Else
MsgBox Calendar1.Value
End If
End Sub

Swi
 
In the click event the value property will contain the date the user clicks on.

You may also want to check out the monthview control in Windows Common Controls 2. I find it much easier to use.
 
How can I read from the click event??
 
As my example shows and bjd4jc has explained the '.Value' property of the calendar control will contain the date the user clicked on.

Swi
 
I understand what you guys are saying now. - Thanks much, I've searched all over for this. -
 
No problem. Glad to help.

Swi
 
How about adding text or drag and drop controls into those dates on the calender??
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top