I have this code;
Dim MyVal As Long
MyVall = MyVal + (b * (n And &HFF)) '2147481230 + 20202
MyVal = MyVal And &HFFFF
MyVal = 2147481230
b = 111
n = 307382
When it tries to add MyVal to b,n, it produces an overflow. So I changed the data type to variant but then it had the overflow on the AND part of the code.
Any ideas how I can get around this?