Hi,
In Property pages of Text1 .. MaxLength = 3
write this code, in Validate Event of textbox
Private Sub Text1_Validate(Cancel As Boolean)
If Val(Text1.Text) > 0 And Val(Text1.Text) <=100 Then
Else
Cancel = True
End If
End Sub
Regards
Veena
QVeen72
Veteran Poster
1,017 posts since Nov 2006
Reputation Points: 118
Solved Threads: 164
Skill Endorsements: 5
A MaskedEdit Control will restrict your input to numbers and you can specify a certain number of digits, and you can specify formatting as well.
tinstaafl
Nearly a Posting Virtuoso
1,334 posts since Jun 2010
Reputation Points: 355
Solved Threads: 234
Skill Endorsements: 14