This is another way
Private Sub TextBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger) KeyAscii = -KeyAscii * (Chr(KeyAscii) Like "[0-9]") End Sub
This is another way
Private Sub TextBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger) KeyAscii = -KeyAscii * (Chr(KeyAscii) Like "[0-9]") End Sub