XL97: Page Fault Opening Workbook with a Merged Column (168362)
The information in this article applies to:
- Microsoft Excel 97 for Windows
This article was previously published under Q168362 SYMPTOMS
When you open a workbook in Microsoft Excel 97, you may receive 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
0137:301e2e4f.
CAUSE
This problem may occur if you select at least one entire column in a
worksheet in the workbook and merge the cells into a single cell by
clicking Merge Cells.
RESOLUTION
To prevent this problem from occurring, do not merge an entire column (or
columns) of cells into a single cell.
Microsoft provides examples of Visual Basic for Applications procedures 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. The Visual Basic procedures in this article are
provided 'as is' and Microsoft does not guarantee that they can be used in
all situations. While Microsoft support professionals can help explain the
functionality of a particular macro, they will not modify these examples to
provide added functionality, nor will they help you construct macros to
meet your specific needs. If you have limited programming experience, you
may want to consult one of the Microsoft Solution Providers. Solution
Providers offer a wide range of fee-based services, including creating
custom macros. For more information about Microsoft Solution Providers,
call Microsoft Customer Information Service at (800) 426-9400.
To work around this problem, use the following Visual Basic for
Applications macro to unmerge all of the cells in the workbook before the
invalid page fault occurs:
Sub UnMergeAllCellsInWorkbook()
Workbooks.Open FileName:="Test.xls"
For Each xSheet In ActiveWorkbook.Worksheets
xSheet.Range("A:IV").UnMerge
Next xSheet
End Sub
In the second line of the macro, substitute the name of the workbook for
"Test.xls." When you run this macro, Microsoft Excel 97 opens the workbook
and unmerges all cells in every worksheet in the workbook. After the macro
is finished, you can remerge cells that should remain merged, and then save
the workbook.
NOTE: Because the invalid page fault may occur very quickly, the macro
doesn't find the exact cause of the problem. Instead, it simply unmerges
all of the cells in the workbook.
STATUS
Microsoft has confirmed this to be a problem in the Microsoft products
listed at the beginning of this article. This problem no longer occurs in
Microsoft Excel 2000.
Modification Type: | Major | Last Reviewed: | 11/4/2000 |
---|
Keywords: | kberrmsg kbprb KB168362 |
---|
|