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

working with the calender

Status
Not open for further replies.

sthmpsn1

MIS
Sep 26, 2001
456
US
I am trying to work with the calender control and have a sub routine that I am running when the user clicks a date in the calender.

Here is my code and what I am trying to do is seperate the month,day, and year that they have choosen.

Sub Date_selected(sender as Object,e as EventArgs)
Label1.text="The selected date is " & Calendar2.SelectedDate.ToShortDateString()
label2.text= month(Calendar2.SelectedDate.ToShortDateString())
label3.text= day(Calendar2.SelectedDate.ToShortDateString())
label4.text= year(Calendar2.SelectedDate.ToShortDateString())
End Sub

I get an error saying that Reference to a non-shared member requires an object reference

any ideas???
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top