XL5: GP Fault Running Macro After Adding Option PrivateLast reviewed: September 12, 1996Article ID: Q120197 |
The information in this article applies to:
SYMPTOMSIn Microsoft Excel, you receive a general protection (GP) fault if you run a macro using the Macro dialog box after adding the Option Private Module statement to a procedure in an open workbook. Another symptom of this problem is that a name appears in the Macro Name/Reference list in the Macro dialog box, that does not correspond to a macro contained in any of the open workbooks.
CAUSEThis problem occurs if you display the Macro dialog box, or run a procedure using the Run Macro button, and then add the Option Private Module statement to a procedure in an open workbook. The problem only occurs when you display the Macro dialog box while a module sheet is not the active sheet, after adding the Option Private statement. The problem occurs because the Macro dialog box does not update correctly with the new macro information. When you add the Option Private Module statement to the beginning of an module, the procedures that are contained in that module do not appear in the Macro dialog box. However, if you run a procedure, or display the Macro dialog box, and then add statement to an open module, you receive a GP fault if you run a procedure using the Macros dialog box while the active sheet is not a module sheet. Note that you may also receive a GP fault when you choose Cancel in the Macro dialog box.
WORKAROUNDTo avoid receiving a GP fault after adding the Option Private Module statement to a Visual Basic module, do either of the following:
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in Microsoft Excel version 5.0c for Windows.
REFERENCESFor more information about the Option Private Statement, choose the Search button in the Visual Basic Reference and type:
Option Private |
KBCategory: kbprg
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |