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.

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

 Page 1 of 1 [ 6 post ]

Relevant Pages