Microsoft KB Archive/168365

= XL97: Page Fault Displaying Macro Options Dialog Box in Macro =

Article ID: 168365

Article Last Modified on 10/22/2000

-

APPLIES TO


 * Microsoft Excel 97 Standard Edition

-



This article was previously published under Q168365



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:

157108 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.



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: kberrmsg kbprogramming kbprb KB168365

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.