You receive an "An error occurred while loading 'Sheet1111111111111...' " error message when you open a file in Excel 2000 (236299)
The information in this article applies to:
This article was previously published under Q236299 SYMPTOMS In Microsoft Excel 2000, when you try to
open a file that was saved in Excel 97, you receive an
error message similar to the following: An error
occurred while loading 'Sheet111111111111111111111111111'. Do you want to
continue loading the project? If you click Yes you receive the following error message
This program has performed an illegal operation and will be shut down.
with details similar to the following: EXCEL
caused an invalid page fault in module VBE6.DLL at 0167:650f6290. If
you click No you receive the error message File not
found. and Excel does not open the file. CAUSE These problems occur when the following conditions are
true:
WORKAROUND To work around this problem, use either of the following
methods. Copy to a New Workbook Open the problem file in Excel 97, and copy all but the sheet
with the longest (Name) property to a new workbook. You can now open this workbook in
Excel 2000. Use the Microsoft Excel 97 File Recovery Macro- Open the workbook in Microsoft Excel 97 and use the
Microsoft Excel 97 File Recovery Macro to create a copy of the problem
workbook.
- Open the re-created workbook in Excel 2000.
For more information about this macro, or to download this
macro, go to the chapter on the Office Resource Kit at the following Microsoft
Web site: Scroll down to the Microsoft Excel 97 File Recovery Macro section, and click the Download and run link to
download and install the add-in. Macro to Prevent This Problem in the FutureMicrosoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers 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 requirements. To prevent this problem in the future, you can
use macro code similar to the following in your Visual Basic for Applications
macros. The following procedure uses the Sheets.Add method instead of the built-in ActiveSheet.Copy macro command. The procedure then copies the information from the
original sheet to the newly created sheet. Because this method uses a different
naming convention, it avoids the problem.
Sub CreateNewSheet()
Dim origSheet As Worksheet
Dim newSheet As Worksheet
Set origSheet = ThisWorkbook.ActiveSheet
Set newSheet = Sheets.Add ' Add a new sheet.
origSheet.Activate ' Go back to the original sheet.
origSheet.UsedRange.Copy ' Copy the used range.
newSheet.Activate ' Go to the new sheet.
ActiveSheet.Paste ' Paste the information from the original.
End Sub
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.MORE INFORMATION Microsoft has changed the way Excel names a copy of a
worksheet in Visual Basic for Applications. In Excel 97, when you copy a
worksheet, Visual Basic for Applications gives the new worksheet a (Name) property by adding a 1 to the end of the (Name) property of the original sheet. If the (Name) property of the original sheet is "Sheet1", the (Name) property of the copied sheet becomes "Sheet11". This fails after
a number of iterations, when the sheet (Name) property becomes longer than 32 characters. At this point, Excel
97 stops responding (crashes). In Excel 2000, Visual Basic for
Applications numerically increments the (Name) property, rather than adding a 1 on the end. Therefore, this
problem is not likely to occur when you make multiple worksheet copies in Excel
2000. To view the (Name) property, follow these steps:
- Press ALT+F11 to switch to the Visual Basic
Editor.
- On the View menu, click Project Explorer.
- In the Project window, click the plus sign next to the VBAProject name of the workbook to expand the tree.
- Click the plus sign next to the Microsoft Excel Objects folder to see the worksheets.
- Select the last workbook on the tree.
- On the View menu, click Properties Window.
- In the Properties window, click the Alphabetic tab. View the top item which should be (Name).
Normally, you can edit this name in the box to the
right. NOTE: Editing the (Name) property after the problem has occurred does not solve the
problem. If you reopen the problem file in Excel 97, switch to the Visual Basic
Editor, shorten the text of the worksheet (Name) property that is longer than 31 characters, and try to save the
file, Excel crashes and the save fails. Details show:
Excel has caused an invalid page fault in module Ole32.dll at 015f:7ff3da31
This same error message occurs if you delete the last worksheet
copied and save the file.
REFERENCES
For more information about how to move or copy sheets , click Microsoft Excel Help on the
Help menu, type Move sheets in the Office Assistant or the Answer Wizard, and then click Search to view the topic.
Modification Type: | Major | Last Reviewed: | 6/30/2005 |
---|
Keywords: | kbAutomation kbProgramming kbxlerrnum kbopenfile kbbug kbpending KB236299 |
---|
|