ID: Q184177
The information in this article applies to:
When you type a mathematical formula that is similar to the following in the Immediate window in the Visual Basic Editor
?200*200
you receive the following error message:
Run-time Error 6:
Overflow
This problem occurs when the result of the calculation you type in the Immediate window is too large to be represented by an Integer type expression; the result exceeds the limit for the Integer type expression.
To resolve this behavior, assign the Long integer data type to any mathematical functions that return a value larger than 32,767. To assign the Long integer data type in the Immediate window, use the ampersand (&) character. For example, use the following syntax:
?200&*200
This behavior is by design of Microsoft Excel 98.
Long integer variables are stored as signed 32-bit (4-byte) numbers that range in value from -2,147,483,648 to 2,147,483,647. The type declaration character for Long is the ampersand (&) character.
Integer variables are stored as 16-bit (2-byte) numbers that range in value from -32,768 to 32,767.
For more information about Data types, click the Office Assistant, type "Data Types," click Search, and then click to view "Using Data Types Effectively."
NOTE: If the Assistant is hidden, click the Office Assistant button on the Standard toolbar. If Microsoft Help is not installed on your computer, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q179216
TITLE : OFF98: How to Use the Microsoft Office Installer Program
Additional query words: XL98
Keywords : kberrmsg kbprg kbtool kbdta xlvbainfo OffVBA xlmac
Version : MACINTOSH:98
Platform : MACINTOSH
Issue type : kbprb
Last Reviewed: April 19, 1998