Hi,
Why is the following code gives me an overflow error?
I've also dimmed XYZ as Long, and Single and still get the error.Code:Dim XYZ As Double
XYZ = 365 * 100
Debug.Print XYZ
Thanks,
Al.
Printable View
Hi,
Why is the following code gives me an overflow error?
I've also dimmed XYZ as Long, and Single and still get the error.Code:Dim XYZ As Double
XYZ = 365 * 100
Debug.Print XYZ
Thanks,
Al.
i tried
that works but don't know if that's what you wantedCode:Dim a As Long
Dim b As Long
Dim c As Long
a = 100
b = 365
c = a * b
Print c
[Edited by theman32x on 08-26-2000 at 01:01 PM]
I am having a majorly hard time understanding this but MSDN recommends trying this:
and it appears to work, just dont ask me why!Code:Dim XYZ As Double
XYZ = CDbl(365) * 100
Debug.Print XYZ
[Edited by wossname on 08-26-2000 at 01:41 PM]
you must use the CDbl function on it to explicitly make the parameter a Double
??????????????????????????????
would your code be a parameter
??????????????????????????????
[Edited by theman32x on 08-26-2000 at 04:11 PM]