Unfortunately, the Overflow error is a pretty generic error anytime a variable is assigned a value that might be too big for it.

Of course there are the obvious ones, like when someone tries to set a Byte to 1000, or an Interger to 100000.

There is also one "hidden" type of overflow that isn't always obvious... temporary variable overflows. If you are doing math with integers and placing the result in a long, all of the math will get done with integers and nothing gets converted to a long until the assignment. So as an example, the follow code would generate one of these "hidden" overflows:

Dim I1 as Integer

Dim I2 as Integer

Dim L1 as Long

I1 = 1000

I2 = 2000

L1 = I1 * I2 'OVERFLOW

The math operation of 1000 * 2000 will be done in a temporary Integer because none of the operators use a larger data type. Sure the result of 2,000,000 will fit in a Long just fine, but not in the "hidden-temp" Integer variable VB will place the results in before they get copied to L1.