XL97: Page Fault Displaying Macro Options Dialog Box in Macro

Last reviewed: January 9, 1998
Article ID: Q168365
The information in this article applies to:
  • Microsoft Excel 97 for Windows

SYMPTOMS

In Microsoft Excel 97, if you run a Visual Basic for Applications macro to display the Macro Options dialog box, you may receive the following error message:

   This program has performed an illegal operation and will be shut down.
   If the problem persists, contact the program vendor.

If you click Details, you receive an error message similar to the following:

   EXCEL caused an invalid page fault in module EXCEL.EXE at
   0137:3003324b.

CAUSE

This problem occurs if the macro includes the following line of code:

   Application.Dialogs(xlDialogMacroOptions).Show

WORKAROUND

Although it is not possible to programmatically display the Macro Options dialog box, it is possible for a macro to control the settings in the dialog box. For additional information, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q157108
   TITLE     : XL97: Options not Available in Macro Options Dialog Box

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

In Microsoft Excel 97, you can display the Macro Options dialog box by doing the following:

  1. On the Tools menu, point to Macro, and then click Macros.

  2. In the Macro dialog box, click a macro in the list of macros, and then click Options.

It is not possible for a Visual Basic macro to display this dialog box because it is a child dialog box of the Macro dialog box; that is, the Macro Options dialog box cannot be displayed unless the Macro dialog box is already visible.

NOTE: In earlier versions of Microsoft Excel, an illegal operation does not occur if you attempt to display the Macro Options dialog box. Instead, you receive the following error message

   Run-time error '1004':
   Show method of Dialog class failed

and the Macro Options dialog box is not displayed.


Additional query words: XL97
Keywords : xlvbahowto xlvbainfo kberrmsg kbprg
Version : WINDOWS:97
Platform : WINDOWS
Issue type : kbprb
Solution Type : kbworkaround


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