Excel: Integer Edit Box in Custom Dialog Box Returns 32,767

Last reviewed: October 31, 1994
Article ID: Q50985

SUMMARY

In Microsoft Excel, the largest number that can be placed in an integer edit box of a custom dialog box is 32,767. Placing numbers larger than 32,767 into an integer edit box results in the number 32,767 being entered. Similarly, placing numbers smaller than -32,768 into an integer edit box enters -32,768.

To enter a value greater than 32,767 or less than -32,768 into a user-defined dialog box, make the edit box a number edit box (type 8) instead of an integer edit box (type 7).

This limitation occurs because integers on the Macintosh are defined as values between -32,768 and +32,767. Larger or smaller numbers can be represented using floating point (decimal) numbers, with or without a fractional portion. The substitution of floating point numbers for integers larger than 32,767 or smaller than -32,768 is generally done automatically, and it isn't important to know that the number represented is actually stored as an integer rather than a floating point value. However, in custom dialog boxes, defining an edit box as a type 7 (integer edit box) forces the input number to have a value between -32,768 and 32,767.


KBCategory: kbother
KBSubcategory:

Additional reference words: 2.20 3.00


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 31, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.