Hi,
I wanted to set up a validation that would ensure that only a number was entered and if not then a msg box will pop up to prompt them.
The text box will be a series of numbers varying in length each time it is entered
At the moment I have the following code:
If Not IsNumeric(txtRefNo.Value) Then
MsgBox "Please enter the organisation number", vbExclamation + vbOKOnly, ""
However, this still allows the following characters to be entered: + - . , $
Can I write a code that will search for these characters within the textbox and prompt the user to correct their input if it doesn't include just numbers
Thanks,
J
I wanted to set up a validation that would ensure that only a number was entered and if not then a msg box will pop up to prompt them.
The text box will be a series of numbers varying in length each time it is entered
At the moment I have the following code:
If Not IsNumeric(txtRefNo.Value) Then
MsgBox "Please enter the organisation number", vbExclamation + vbOKOnly, ""
However, this still allows the following characters to be entered: + - . , $
Can I write a code that will search for these characters within the textbox and prompt the user to correct their input if it doesn't include just numbers
Thanks,
J