The information in this article applies to:
SYMPTOMSIn Microsoft Excel, you receive a general protection (GP) fault when you run a Visual Basic procedure that passes an argument to another sub procedure, if the sub procedure closes the workbook that contains the calling procedure. CAUSEFor example, this problem occurs if you use the following syntax to call the sub procedure "Update" with the argument "1":
-or-
If the procedure Update in the above example closes the workbook that
contains the Application.Run command (the calling procedure), you receive a
GP fault. The problem occurs whether the procedures are stored in the
same workbook, or different workbooks.
WORKAROUNDTo avoid receiving a GP fault when you call a sub procedure with an argument, when the sub procedure closes the workbook that contains the calling procedure, use the following syntax to call the sub procedure:
STATUS
Microsoft 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 7.0. Q118881 XL5: Unexpected Results Calling Sub Procedure with Arguments Additional query words: 1.00 gpf
Keywords : |
Last Reviewed: September 16, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |