Hello,
Looking for the code to check a userform textbox to see if anything in it contains anything other than numbers. Basically textbox1 takes the input and finds the numbers, however if someone accidently inserts letter or special character instead of a number it messes my other code up. I would like to add one if in the below code that ensures that textbox1 only contains numbers and if not gives a message box saying "please ensure values are numeric only" and then exits sub. Any help appreciated.
Looking for the code to check a userform textbox to see if anything in it contains anything other than numbers. Basically textbox1 takes the input and finds the numbers, however if someone accidently inserts letter or special character instead of a number it messes my other code up. I would like to add one if in the below code that ensures that textbox1 only contains numbers and if not gives a message box saying "please ensure values are numeric only" and then exits sub. Any help appreciated.
Code:
If DeleteTool.TextBox1 = "" Then 'Appears if there is no Item input
MsgBox ("Please insert item number(s)")
GoTo finish
End If
Last edited: