=CLOSE() Returns a Macro Error on Protected WorksheetLast reviewed: November 2, 1994Article ID: Q66760 |
The information in this article applies to:
SUMMARYWhen the =CLOSE() command is used in a macro that closes a protected worksheet, Microsoft Excel produces a macro error. This only happens when the worksheet has window protection, whether the =CLOSE() command parameter is true, false, or none. This occurs because the =CLOSE() command is the same command that is available on the worksheet's control menu. A macro error is produced because there is no control menu on a window-protected worksheet. (Note: this is also true for version 5.0 macro sheets, but not modules.)
SolutionTo correct the problem, use =FILE.CLOSE(). This command is available on any worksheet, whether it is protected or not.
|
KBCategory: kbusage
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |