Integer or "integer"?? 
Author Message
 Integer or "integer"??

Does anyone know how to detect whether the value of a variant is an integer
as opposed to the ascii character combination of a number?

Thanks,
Jon



Fri, 15 Feb 2002 03:00:00 GMT  
 Integer or "integer"??
If VarType(variable) = vbInteger Then

David

Quote:

>Does anyone know how to detect whether the value of a variant is an integer
>as opposed to the ascii character combination of a number?

>Thanks,
>Jon



Fri, 15 Feb 2002 03:00:00 GMT  
 Integer or "integer"??
vartype.... never heard of it before...gawd.... thank you.. I feel so dumb
now

Jon


Quote:
> If VarType(variable) = vbInteger Then

> David


> >Does anyone know how to detect whether the value of a variant is an
integer
> >as opposed to the ascii character combination of a number?

> >Thanks,
> >Jon



Fri, 15 Feb 2002 03:00:00 GMT  
 Integer or "integer"??
There are also TypeName and TypeOf

Jon Davis D??? ???Y?? ...

Quote:
>vartype.... never heard of it before...gawd.... thank you.. I feel so dumb
>now

>Jon



>> If VarType(variable) = vbInteger Then

>> David


>> >Does anyone know how to detect whether the value of a variant is an
>integer
>> >as opposed to the ascii character combination of a number?

>> >Thanks,
>> >Jon



Sat, 16 Feb 2002 03:00:00 GMT  
 Integer or "integer"??
why not simply do a val or a CInt on the variant to force an interger
conversion?
Quote:

>Does anyone know how to detect whether the value of a variant is an integer
>as opposed to the ascii character combination of a number?

>Thanks,
>Jon



Sat, 16 Feb 2002 03:00:00 GMT  
 Integer or "integer"??
Because I was trying to detect it, not convert it.  If it's not a number
then it's a string or date, in which case I replace single-quotes in the
string with two single-quotes, and encapsulate the string with
single-quotes, to prepare it for import into SQL Server.

Bah.. prolly more info than you wanted to know.  :)

Jon


Quote:
> why not simply do a val or a CInt on the variant to force an interger
> conversion?


> >Does anyone know how to detect whether the value of a variant is an
integer
> >as opposed to the ascii character combination of a number?

> >Thanks,
> >Jon



Sat, 16 Feb 2002 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. "Integer divide by zero"

2. Application Error - "Integer divide by 0"

3. Update integer field with "Null" value

4. Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)

5. Converting integers and long integers to byte arrays

6. converting a "long integer" to a "single"

7. Long = Integer * Integer Overflow error

8. Integer VB Vrs Integer SQL Arrrgggggggg

9. How do you use new Bitmap(Integer,Integer,Integer,PixelFormat,IntPtr)?

10. *"*-.,._,.-*"* I"LL TRADE VISUAL C++ FOR VBASIC *"*-.,_,.-*"*

11. GetObject("","InternetExplorer.Application") fails in Excel VBA

12. SysCmd 603, "path","path"

 

 
Powered by phpBB® Forum Software