Hi I have a program where i want the texbox only to input numbers i have the ascii coding but the problem is that it is a private sub so even when i dont have to put in data into the textbox it still does the ascii check. here is my coding

Private Sub txtfirstname_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
Case 33 To 64, 91 To 96, 123 To 126
MsgBox ("Only letters supported for this field! Please input a name.")
KeyAscii = 0
Exit Sub
End Select

End Sub