Error using cint with large numbers
Posted on 2003-03-12
I am adding 2 values together. One is from a database and one is not... ie.
Total = Total + NewNumber
...which gives me a type mismatch error. So I convert NewNumber to an integer, giving me this...
Total = Total + cint(NewNumber)
This works fine unless the value of NewNumber is outside of the -32,768 to 32,767 range, which is very possible. If that is the case I get this error...
I tried to use the int function instead of the cint function and get this wonderful error...
"Variable uses an Automation type not supported in VBScript"
Any ideas out there on how I can add these 2 numbers together.