Q:

Need help Visual Basic IsDate(), European date (dd/mm/yyyy) format function

I'm brand new to Visual Basic and I need some help with a program I'm working on. 
I have 3 seperate textboxes for Day, Month and Year and none accept any other character then number. 
Now I want to make a code, so that program checks current date everytime and reminds you if you enter a date that has already expired, for example if you enter D: 11   M: 11   Y: 2012. 
Can anyone help me here?

A:

Air code.
Dim theYear As Integer, theMonth As Integer, theDay As Integer 
' get text from textboxes and convert to numbers 
If Not Int32.TryParse(txtYear.Text, theYear) Then 
  MsgBox "Please enter a valid year!"
  Exit Sub
End If
If Not Int32.TryParse(txtMonth.Text, theMonth) Then 
  MsgBox "Please enter a valid month!"
  Exit Sub
End If
If Not Int32.TryParse(txtDay.Text, theDay) Then 
  MsgBox "Please enter a valid day!"
  Exit Sub
End If  
' combine numbers into a Date 
Dim theDate As Date = Nothing 
Try
  theDate As New Date(theYear, theMonth, theDay) 
Catch e As Exception 
   'year is less than 1 or greater than 9999. 
  '-or- 
  'month is less than 1 or greater than 12. 
  '-or- 
  'day is less than 1 or greater than the number of days in month. 
  MsgBox "Please enter a valid date!"
  Exit Sub
End Try 
 ' check whether date is in the past 
Dim nowDate As Date = DateTime.Now
If DateTime.Compare(theDate, nowDate) < 0 Then
  MsgBox "That date has expired" 
End If 

Documentation links: 

Date constructor 
DateTime.Now 
DateTime.Compare 
Int32.TryParse

