I have a program where there are text boxes that accept values and then a command button is pressed. I need to know how to let the program check if the values entered are negative or anything that isn't a number. I also need the program to understand that if the text box is empty it should read that as a value of zero instead of just giving me a runtime error.

11 Years
Discussion Span
Last Post by sk8ndestroy14

You can use the function IsNumeric to check if a certain string is numeric or not. It is numeric if it contains only numbers and only one "-" (negative sign). If no text is entered in the textbox, its text value is "". You can use If/Else selection for this.

Votes + Comments
Thanks for the help.

Thanks for helping but now I have a few other problems with the same program. I don't know how to change a datatype from variant to currency part way through a program.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.