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

MonthCalendar Control passing Values

Status
Not open for further replies.

Cobber

Programmer
Jul 31, 2001
7
0
0
NZ
I am trying to use the MonthCalendar control to pass a value to a Text box using the DateDiff function. The idea is that if a user selects a date from the MonthCalendar control the selected date value is then passed to a variable (Firstdate) which in turn is used in the Datediff function to update the Text box.

eg. FirstDate = CDate(FirstDate)
lblDate.Text = DateDiff(DateInterval.Day, Now, FirstDate)


Although I can use the MonthCalendar1.SetDate method to write the value to a variable (and a msgbox), I cannot figure out what method or code to use when a user clicks on a date in the MonthCalendar control and pass that value to the variable.

MSDN talks about Raising events. Any help would be appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top