数値演算、値の変換、代入結果のデータ型が、許容される値の範囲を超えています。
次のいずれかまたは両方を実行してください。
Dim N As Long
I% = 30000 ' Declare I implicitly as an Integer.
J% = 10000 ' J is also an Integer.
Print (I% + J%) ' Overflow from numeric operation. The number
' 40000 cannot be represented as an Integer.
Print CInt(40000&) ' Overflow from attempted conversion of
' a Long value to an Integer value.
Invar% = 40000 ' Overflow from attempted assignment of
' a large value to an Integer variable.
N = 40000 ' No error. N was declared a Long.
MN = 40000 ' No error. MN is implicitly declared a Long
' by the assignment of a large value to it.