I just created a simple sub and it gives an overflow error. However, I don't see anything wrong with the code, and it is really weird since 50000*100
is much bigger than 500*100
.
sub add()
'This will cause an overflow error
cells(1,1) = 500 * 100
'But this won't
cells(2,2) = 50000 * 100
end sub
CLng(500)*100