I was wondering if anyone could help me, as I was blinded to what, in my opinion, is a simple cause of a simple mistake.
I have this code:
doRound1(x1)
denom1 = 5
y1 = denom1 - x1 mod denom1
if y1 <> denom1 then
x1= x1+y1
end if
doRound1=x1
End function
'theCalc = 20488888888.684
theCalc = cDbl(11111111111) * 1.844
doRound1(theCalc)
I get this error
Microsoft VBScript runtime error '800a0006'
Overflow: 'x1'
Called by this line in the above code:
y1 = denom1 - x1 mod denom1
Any ideas? As I said, I have come to a standstill.
pearcel
source
share