XL97: Code "Behind" Worksheet or Workbook may not Work
This article was previously published under Q157346 For a Microsoft Excel 2000 or later version of this article, see 213581 (http://support.microsoft.com/kb/213581/EN-US/).
For a Microsoft Excel 98 version of this article, see 182482 (http://support.microsoft.com/kb/182482/EN-US/). SYMPTOMS
In Microsoft Excel 97, code that is contained "behind" a worksheet or
workbook may not work correctly.
CAUSE
This will occur if both of the following conditions are true:
WORKAROUND
In order for automatically-running subroutines to work correctly in
Microsoft Excel 97, they must be contained within a Visual Basic module. To
insert a new module:
STATUS
Microsoft has confirmed this to be a problem in the Microsoft products
listed at the beginning of this article.
MORE INFORMATION
In Microsoft Excel 97, Visual Basic for Applications code can be stored in
three different locations: in a Visual Basic module, in a Visual Basic
class module, and "behind" worksheets and workbooks.
To edit code "behind" a worksheet or a workbook:
If an Auto_Open, Auto_Close, or other automatically-running subroutine is stored "behind" a worksheet or ThisWorkbook, it may not function correctly when you open or close your workbook, or when you perform an action that should cause the subroutine to run.
| Article Translations
|

Back to the top
