|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
Creating a Boolean Test for Numbers?
Alright in class i had a hard time learning this because we kinda just skipt through it.
is it somthing like... Dim Name As Boolean If Name is Numeric Then ]Code[ Else ]skip[ End if .... ok thats wrong i know it is. i would like to test a Text box... Thanks for any help ![]() |
|
#2
|
|||
|
|||
|
Try If IsNumeric(variable) Then ...
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
|
#3
|
|||
|
|||
|
Quote:
lol yeah thats it, thanks man, ![]() ------------- ok well not reallt, it keeps giving me an error about IsNumeric but i guess i will ask my teacher, thanks anyways ![]() |
|
#4
|
|||
|
|||
|
Quote:
I dont know if this is too advanced for you , but you can always use the 'try catch exception' statement while trying to assign values from the text box to the declared variable of type any number (eg int ,double etc). If the value from the text box in not the right type, an exception would be thrown, and then you can catch that exception to validate you field text. Hope I am not confusing you. Shaz |
|
#5
|
||||
|
||||
|
IsNumeric...
Just in case you did not check this... when using IsNumeric, make sure to specify that you
are evaluating the Text or Value property. For example: If Isnumeric(textbox1.text) Then 'VB.net or .value I think in VB6 ..... End If Hope this helps... |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Creating a Boolean Test for Numbers? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|