Excel: Illegal Dialog Error, Values Rounded in Custom Dialog

Last reviewed: November 2, 1994
Article ID: Q50508

SUMMARY

Note: This behavior only occurs in versions of Microsoft Excel prior to version 3.00. Excel 3.00 does not depend on the width of the column for displaying values in a user defined dialog box.

After entering a number into a custom dialog box in Excel, when the dialog box is called up a second time, you may get a dialog box error, or the number may be rounded, if the Initial/Result column of the dialog box table is not sufficiently wide.

If you are working with an integer edit field or a number edit field in a user-defined dialog, the initial/result column (column 7) must be wide enough to display the value of the cell with display set to Show Values (that is, Show Formulas turned off). Macro sheets default to displaying formulas, which display columns twice as wide as when displaying values. If the width of the initial/result column in your user-defined dialog descriptor is too narrow, one of the following problems can occur:

  1. An initial value you set for an edit integer or edit number field may not display.

  2. You may receive an "Illegal dialog value at [ref]" alert when the =DIALOG.BOX() statement is executed.

  3. The value may be rounded to the number of digits that display on the macro when Formula Display is turned off.

To ensure the correct value is displayed in the dialog, make sure the column is wide enough to display the formatted value when the macro sheet is displaying values rather than formulas.


KBCategory: kbother
KBSubcategory:

Additional reference words: 1.50 2.20


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: November 2, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.