I'm working with dates and I ran into a strange issue. If you multiply 160 by 1440, 60*24, vba gives an overflow error even when using a long. However, if you multiply 160 by 86440, 60*60*24, the overflow error does not occur. Does anyone have any idea as to why this would happen? I have already found a work around, but this doesn't make any sense.
Thank you for any help!
Sub test()
Dim numb As Long
numb=160*1440
numb=160*86400
End Sub
If you comment out the first line it runs without an overflow error, but with the first line in the overflow error occurs.