XL: Excel 4.0 Dialog Box Causes Error in Excel 5.0

Last reviewed: February 3, 1998
Article ID: Q108189

The information in this article applies to:
  • Microsoft Excel for Windows, versions 5.0, 5.0c
  • Microsoft Excel for the Macintosh, versions 5.0, 5.0a
  • Microsoft Excel for Windows 95, version 7.0
  • Microsoft Excel 97 for Windows
  • Microsoft Excel 98 Macintosh Edition

SUMMARY

If you run a Microsoft Excel 4.0 macro in Microsoft Excel version 5.0 and later with a dialog box that contains an undefined item number, you may receive the following error message:

   Error in dialog at MacroSheetName!Cell_Reference

where Cell_Reference refers to the undefined item number. You will then receive a macro error at the cell containing the DIALOG.BOX() function.

This same macro will run without error in Microsoft Excel 4.0.

MORE INFORMATION

In Microsoft Excel 4.0, your dialog box definition table can contain undefined dialog box items. These undefined items are used to hide an item on the dialog box. However, when the undefined item number follows an option button (item number 12), Microsoft Excel versions 5.0 and 7.0 will report the above macro error messages.

For a list of dialog box item numbers, see pages 274-279 of "User's Guide 2," version 4.0.

WORKAROUNDS

To work around this problem, do either of the following:

  • Change the order in which the items are listed so the undefined item number comes BEFORE the option button, not after it.

        -or-
    
  • Create the dialog box in either a Microsoft Excel version 5.0 or 7.0 dialog sheet and use the visible property to hide and unhide the object in the dialog box.

REFERENCES

"User's Guide 2," version 4.0, pages 274-279.


Additional query words: 4.00 5.00 7.00 8.0
Keywords : kbprg PgmHowto
Version : WINDOWS:5.0,5.0c,7.0,97; MACINTOSH:5.0,5.0a,98
Platform : MACINTOSH WINDOWS
Issue type : kbinfo


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