VB Code:
Private Sub Text1_KeyPress(KeyAscii As Integer)
KeyAscii = CheckIt(KeyAscii)
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
KeyAscii = CheckIt(KeyAscii)
End Sub
Private Sub Text3_KeyPress(KeyAscii As Integer)
KeyAscii = CheckIt(KeyAscii)
End Sub
Private Sub Text4_KeyPress(KeyAscii As Integer)
KeyAscii = CheckIt(KeyAscii)
End Sub
Function CheckIt(KeyAscii As Integer) As Integer
If KeyAscii >= Asc("0") And KeyAscii <= Asc("9") Then
CheckIt = KeyAscii
Else
CheckIt = 0
End If
End Function