Article ID: 182482
Article Last Modified on 9/11/2002
APPLIES TO
- Microsoft Excel 98 for Macintosh
This article was previously published under Q182482
For a Microsoft Excel 2000 or later version of this article, see
213581.
For a Microsoft Excel 97 version of this article, see
157346.
SYMPTOMS
In Microsoft Excel 98 Macintosh Edition, code that is contained "behind" a
worksheet or workbook may not work correctly.
CAUSE
This problem will occur if both of the following conditions are true:
- The code in question is contained inside an automatically-running
subroutine, such as an Auto_Open or Auto_Close subroutine.
-and-
- The code is not contained in a Visual Basic module, but "behind" a
worksheet or the workbook (ThisWorkbook) itself.
WORKAROUND
In order for automatically-running subroutines to work correctly in
Microsoft Excel 98 Macintosh Edition, they must be contained within a
Visual Basic module. To insert a new module:
- In the Project Explorer in the Visual Basic Editor, activate the
workbook that contains the code in question.
- On the Insert menu, click Module.
Once the new module is inserted, cut the code from its original location
and paste it into the Visual Basic module. Then, save the workbook.
STATUS
Microsoft has confirmed this to be a problem in the Microsoft products
listed at the beginning of this article.
Additional query words: XL98 vbe auto open close
Keywords: kbprogramming kbprb KB182482