943,697 Members | Top Members by Rank

Ad:
Jul 8th, 2007
0

Error Check

Expand Post »
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.
Similar Threads
Reputation Points: 437
Solved Threads: 1
Posting Virtuoso
sk8ndestroy14 is offline Offline
1,851 posts
since Mar 2007
Jul 8th, 2007
1

Re: Error Check

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.
Reputation Points: 26
Solved Threads: 5
Junior Poster
scudzilla is offline Offline
191 posts
since Mar 2007
Jul 9th, 2007
0

Re: Error Check

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.
Reputation Points: 437
Solved Threads: 1
Posting Virtuoso
sk8ndestroy14 is offline Offline
1,851 posts
since Mar 2007
Jul 9th, 2007
0

Re: Error Check

Nevermind. I figured out how to change datatypes. I finished the program. Thanks for the help.
Last edited by sk8ndestroy14; Jul 9th, 2007 at 1:14 am.
Reputation Points: 437
Solved Threads: 1
Posting Virtuoso
sk8ndestroy14 is offline Offline
1,851 posts
since Mar 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: definig a 3d array of unknown size
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Click event





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC