I'm just trying to add a simple function to the textbox for security that if i only allow 0 - 9 Numbers and i try to put a letter it wont let me i forgot the code so if any can help me ...
Try this code
Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)
KeyAscii = Asc(UCase$(Chr$(KeyAscii)))
If KeyAscii < Asc("0") Or KeyAscii > Asc("9") Then
KeyAscii = 0