help me about convert data type 
Author Message
 help me about convert data type

Hi,
    I'm still writting program but I found problem about I can't convert
String Variable into Long Variable. I used code bolow

dim NewLong    as LONG
dim  OldVar        as String

    OldVar = "TEST"
    NewLong = CLNG(OldVar)

It's type mismatch I want to know How I do ?
Please answer me  via e-mail.

                                        Regard



Sat, 21 Oct 2000 03:00:00 GMT  
 help me about convert data type

This is due to the content of OldVar,

Since "TEST" can not be a numeric value, it will error when trying to
convert it to a Long Integer,

If However, OldVar = "23434", then the CLng() function will work and will
return 23434

Steve

Quote:

>Hi,
>    I'm still writting program but I found problem about I can't convert
>String Variable into Long Variable. I used code bolow

>dim NewLong    as LONG
>dim  OldVar        as String

>    OldVar = "TEST"
>    NewLong = CLNG(OldVar)

>It's type mismatch I want to know How I do ?
>Please answer me  via e-mail.

>                                        Regard




Sat, 21 Oct 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Help Me About Convert Data Type

2. Help Me about Convert Data type

3. Help Me about Convert Data Type

4. help me about convert data type

5. problem of converting C's union type to VB's a data type

6. problem of converting C's union type to VB's a data type

7. Access 2000 converted to Access 97 report query data type errors

8. Converting Data Types in Code

9. Converting a GUID data type to a String

10. Convert date serial to a date data type

11. How to convert a GUID string to a GUID data type

12. Converting integer (or long) data type to array of bytes

 

 
Powered by phpBB® Forum Software