XL97: Macro Stops Running When its Workbook Is Closed (157103)
The information in this article applies to:
- Microsoft Excel 97 for Windows
This article was previously published under Q157103 SYMPTOMS
In Microsoft Excel 97, if a macro closes a workbook (even its own workbook)
that contains running macros, the macros stop running immediately.
Depending on how your macros are written, this may cause problems.
CAUSE
This occurs in Microsoft Excel 97 because macros in the workbook
immediately halt execution when a workbook is closed.
This behavior is by design of Microsoft Excel.
RESOLUTION
This new behavior should only cause problems if a macro closes a workbook
(even its own workbook) that contains a running macro. Look for the
following commands in your macros:
ThisWorkbook.Close
ActiveWorkbook.Close
If your macros contain either of these commands, you may be closing
workbooks that contain running macros. You should examine your macros to
make sure you are not trying to run macro commands in a workbook after it
is closed.
Modification Type: | Minor | Last Reviewed: | 10/11/2006 |
---|
Keywords: | kbdtacode kbprb kbProgramming KB157103 |
---|
|