Convert string to number

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Using CInt(cbPartNbr.Column(3)), I get an overflow. cbPartNbr.Column(3) is
not the bound column, and it's presented for some reason as a string. It's a
number, and often over 32,767. I don't know the limit for CInt(), but I can't
seem to find any other function that might convert to a long integer or a
floating-point to overcome the limit issue. Any ideas?
 
CLng will convert to a Long Integer (-2,147,483,648 to 2,147,483,647). CSng
will convert to a Single, CDbl will convert to a Double.
 
JimS said:
Using CInt(cbPartNbr.Column(3)), I get an overflow. cbPartNbr.Column(3) is
not the bound column, and it's presented for some reason as a string. It's a
number, and often over 32,767. I don't know the limit for CInt(), but I can't
seem to find any other function that might convert to a long integer or a
floating-point to overcome the limit issue. Any ideas?


Integers can only hold values up to 32,767. Use CLng
instead. There is a broad list of C... functions to convert
to any availalble datatype.
 
Back
Top