Article ID: 180699
Article Last Modified on 6/23/2005
APPLIES TO
- Microsoft Excel 97 Standard Edition
- Microsoft Excel 98 for Macintosh
This article was previously published under Q180699
SYMPTOMS
When you open a workbook, a macro that is designed to run when you
deactivate the active worksheet does not run.
CAUSE
This problem occurs when the following conditions are true:
- An OnSheetDeactivate macro is assigned to the active worksheet
or workbook, or a macro is attached to the Deactivate event of
the active worksheet.
-and-
- You open a Hypertext Markup Language (HTML) document in Microsoft Excel.
When you open an HTML document, OnSheetDeactivate and Deactivate macros
that are assigned to the active worksheet do not run. However, after you
open the HTML document, the OnSheetDeactivate and Deactivate macros work
correctly.
NOTE: This problem does not occur when a macro is attached to the
Deactivate event of the active workbook.
WORKAROUND
To work around this problem, follow these steps:
- Click the worksheet that was active when you opened the .htm
document.
- Switch to the HTML document.
The OnSheetDeactivate or Deactivate macro runs correctly.
STATUS
Microsoft has confirmed this to be a problem in the Microsoft products
listed at the beginning of this article.
Additional query words: XL97 XL98 htm .htm .html XL
Keywords: kbbug KB180699