I was wondering if someone could help me, as I have gone blind to what I believe is a simple cause to a simple error.
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'
Caused by this line in the above code:
y1 = denom1 - x1 mod denom1
Any ideas? As I say, I have gone blind this p.m.