I have added some MaskEd Boxes onto a form in a vb project. One of them is Age.

I need to put an age restriction not to let a person continue unless they are 18 or over.

This is the code i have put in:

If mskAge.Text < "18" Then
MsgBox "Please enter a valid age", vbExclamation, "Age Restriction"
Else
frmPersonalDetails.Hide
frmServices.Show
End If


But when i click run and test it, it works if i enter 10,11,12,13,14,15,16,17 but if i try anything less than ten it lets you through to the next page which i dont want!

Any ideas?