Is there another forum that would be better to ask beginner questions? If so let me know, I'll ask there.

My problem is simple, I'm trying to let a user input a number range 0-50 into a text box, then return valid or not valid in a label.

My problem using val() returns valid whenever the user inputs a letters or a blank (I have to keep 0 as an option) Is there a way to force val to return null or something similiar so that my range doesnt pick it up?

Alternatively I've tried using IsNumeric without much success. Its entirely probable that I'm just doing something wrong.

Here is my code after I gave up on val()


Private Sub txtYexperience_LostFocus()

Dim intYexperience As Integer
intYexperience = txtYeperience

If IsNumeric(intYexperience) = False Then
lblValidYexperience = "No"

Else
If (intYexperience >= 0) And (intYexperience <= 50) = True Then
lblValidYexperience = "Yes"
Else lblValidYexperience = "No"
End If

End If

End Sub

Thank you,
OregonStudent