Microsoft’s Calendar Control 10.0
Feb 9th, 2005 by Brian A. Thomas
It took me ages to find out how to use Microsoft's Calendar Control 10.0 in Visual Basic 6. All I wanted to do was figure out how to get the Calendar Control onto a form, then use it once it was there. Just to share with those that care, to test it out I made a simple form, I added two labels, one that just said "The date selected is:" then the other label I named lblDate. To this form I added the Calendar Control, which was one of the things I spent hours looking up, select Project from the menu, then Components, then select the Controls tab (it should be the default one to come up), then finally Microsoft Calendar Control 10.0, check it and click Apply. It is now part of the controls toolbar, and double clicking it will put it on the form.
I then applied the following code:
-
Option Explicit
-
-
Private Sub Calendar1_Click()
-
lblDate.Caption = Format(Calendar1.Value, "dd, mmmm, yyyy")
-
End Sub
-
-
Private Sub Form_Load()
-
lblDate.Caption = Format(Calendar1.Value, "dd, mmmm, yyyy")
-
End Sub
And then the form worked. I have applied something similar to The Daily Word program. Hopefully, this will be of use to anyone doing a Google search for hours like I did.







Thanks for this tutorial. I was thinking of getting the same. And you really got Googled within me searching for just minutes.
Thanks