| | |
Error Check
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
![]() |
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).
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!
![]() |
Similar Threads
- Fatal Error (Windows NT / 2000 / XP)
- MySQL syntax error check for the right syntax to use near 'A (A) )' at line 1 (PHP)
- Spybot Error during check (Viruses, Spyware and other Nasties)
- Spybot "Error during check!" (Viruses, Spyware and other Nasties)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: definig a 3d array of unknown size
- Next Thread: background image
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age append application basic beginner birth bmp calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver subroutine table tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows






