|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Check variable for integer value
I'm trying to check if a variable is not an integer. How would I do this? I've tried doing it like this but doesn't work:
Code:
If quantity <> Integer Then
Throw New Exception("Value must be a whole value")
End If
__________________
Keep it Prodigy, Keep it Real |
|
#2
|
|||
|
|||
|
One quick and dirty way is to do something like
If x <> (x\1) Then 'x isn't an integer value End If
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
|
#3
|
|||
|
|||
|
Hi,
Code:
If VarType(Quantity) <> vbInteger Then Regards, Michiel |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Check variable for integer value |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|