Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Mar 2007
Posts: 1,851
Reputation: sk8ndestroy14 is an unknown quantity at this point 
Solved Threads: 1
sk8ndestroy14's Avatar
sk8ndestroy14 sk8ndestroy14 is offline Offline
Posting Virtuoso

Error Check

 
0
  #1
Jul 8th, 2007
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.
Disclaimer: Nothing I say can be considered credible information (I wonder what that means about this disclaimer then).
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 181
Reputation: scudzilla is an unknown quantity at this point 
Solved Threads: 3
scudzilla's Avatar
scudzilla scudzilla is offline Offline
Junior Poster

Re: Error Check

 
1
  #2
Jul 8th, 2007
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.
There are 10 types of people: those who understand Binary and those who don't!
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 1,851
Reputation: sk8ndestroy14 is an unknown quantity at this point 
Solved Threads: 1
sk8ndestroy14's Avatar
sk8ndestroy14 sk8ndestroy14 is offline Offline
Posting Virtuoso

Re: Error Check

 
0
  #3
Jul 9th, 2007
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.
Disclaimer: Nothing I say can be considered credible information (I wonder what that means about this disclaimer then).
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 1,851
Reputation: sk8ndestroy14 is an unknown quantity at this point 
Solved Threads: 1
sk8ndestroy14's Avatar
sk8ndestroy14 sk8ndestroy14 is offline Offline
Posting Virtuoso

Re: Error Check

 
0
  #4
Jul 9th, 2007
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.
Disclaimer: Nothing I say can be considered credible information (I wonder what that means about this disclaimer then).
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC