XL97: Invalid Page Fault After Closing Last Open Workbook (158895)
The information in this article applies to:
- Microsoft Excel 97 for Windows
This article was previously published under Q158895 SYMPTOMS
In Microsoft Excel 97, when you close the last open workbook, you may
receive an error message.
If you are using Microsoft Windows 95 or 98, you may see the following
error message:
This program has performed an illegal operation and will be shut down.
If the problem persists, contact the program vendor.
If you click Details, you receive an error message similar to the following
EXCEL caused an invalid page fault in module EXCEL.EXE at
<xxxx:yyyyyyyy>.
where <xxxx:yyyyyyyy> is any of the following addresses:
014f:300f1b0a 0137:3003cf1c
014f:300ef16b
014f:302946ee
014f:3003cf1c
or any other address starting with "014f:30" or "0137:".
If you are using Microsoft Windows NT Workstation 4.0, you may see the
following error message:
An application error has occurred and an application error log is
being generated.
Excel.exe
Exception: access violation (0xc0000005), Address 0x30296879
CAUSE
This problem may occur when the following conditions are all true:
- You create the instance of Microsoft Excel 97 with the CreateObject
method in a Visual Basic for Applications macro.
-and-
- The Visual Basic code that creates the instance of Microsoft Excel
carries out the following sequence of actions before releasing control:
- The macro creates a new workbook, or opens an existing workbook or
other file in the instance of Microsoft Excel.
- The macro makes the instance of Microsoft Excel 97 visible by
setting its Visible property to True.
- The macro releases the Microsoft Excel 97 application object
without first closing the instance.
RESOLUTION
To correct this problem, obtain Microsoft Excel 97 Service Release 2
(SR-2).
For additional information about SR-2, please see the following article
in the Microsoft Knowledge Base:
151261
OFF97: How to Obtain and Install MS Office 97 SR-2
Temporary WorkaroundMicrosoft provides programming examples for illustration only, without warranty either
expressed or implied, including, but not limited to, the implied warranties of
merchantability and/or fitness for a particular purpose. This article assumes
that you are familiar with the programming language being demonstrated and the
tools used to create and debug procedures. Microsoft support professionals can
help explain the functionality of a particular procedure, but they will not
modify these examples to provide added functionality or construct procedures to
meet your specific needs. If you have limited programming experience, you may
want to contact a Microsoft Certified Partner or the Microsoft fee-based
consulting line at (800) 936-5200. For more information about Microsoft Certified
Partners, please visit the following Microsoft Web site:
For more information about the support options that are available and about how to contact Microsoft, visit the following Microsoft Web site:
To temporarily work around this problem, make the Microsoft Excel 97
application object visible BEFORE you create a new workbook, or open an
existing workbook or other file. For example, instead of using the
following code
xlObj.Workbooks.Open "C:\My Documents\Test.xls"
xlObj.Visible = True
use this code:
xlObj.Visible = True
xlObj.Workbooks.Open "C:\My Documents\Test.xls"
When you switch the order of these two actions, the instance of Microsoft
Excel 97 that you create does not stop responding when you close the last
open workbook.
Or, you can set the UserControl property of the Excel Application object to
True. For example:
xlObj.Workbooks.Open "C:\My Documents\Test.xls"
xlObj.Visible = True
xlObj.UserControl = True
STATUS
Microsoft has confirmed this to be a problem in the Microsoft products
listed at the beginning of this article. This problem was corrected in
Microsoft Office 97 Service Release 2 (SR-2).
Modification Type: | Minor | Last Reviewed: | 10/10/2006 |
---|
Keywords: | kbbug kbdtacode kberrmsg kbfix KB158895 |
---|
|