Numbers only!

EZCheeZe

Member
Joined
Dec 12, 2002
Messages
7
Is there a way to make a text box only have numbers in it? Or if thats not possible, is there a way of determining if it is all numbers or not?
 
you can use this in the KeyPress event...
Code:
If Not e.KeyChar.IsDigit(e.KeyChar) Then
and this in the Validating event (in case they paste some text)
Code:
If Not IsNumeric(textbox1.Text) Then
 


Write your reply...
Back
Top