In Excel: “Errors Were Detected While Saving, Fix Errors Were Detected While Saving Excel File

Problem

Consider the following scenario: You are working on a project to automate Microsoft Office. Therefore, you have opened the Microsoft Visual Basic for Applications editor. An Excel worksheet is open as well, which contains a upes2.edu.vn Excel data link (see Excel data links).

Đang xem: In excel: “errors were detected while saving

You delete the Excel worksheet where upes2.edu.vn”s Excel data link resides. Excel may show an error message: “Object required”.

If you try to save the Excel file, Excel shows an error message: “Errors were detected while saving . Microsoft Excel may be able to save the file by removing or repairing some features. To make the repairs in a new file, click Continue. To cancel saving the file, click Cancel.”

*

When you click Continue, the repair fails.

Excel2007 or 2010: Excel crashes if you try to insert a new Excel worksheet instead of trying to save the file.

Cause

Reproduction without upes2.edu.vn

Please perform the following steps:

Start Excel with a new empty file.Enter 100 in cells A1 and A2 on the first worksheet, Sheet1.Select the cells A1:A2 on Sheet1 and press Ctrl + C to copy.(Only if you try to reproduce with Excel2013 or later: Insert a second worksheet. Older Excel versions have three default worksheets, so this is not required).Press Alt + F11 to open the Microsoft Visual Basic for Applications editor window, and leave it open.Start Word with a new empty file.In Word, go toHome→ Paste→ Paste Special→ Paste Link: Microsoft Excel Worksheet Objectand click OK.In Excel, right-click the Sheet1 tab and click Delete.

Xem thêm:

Try to save the Excel file. Excel shows an error message: “Errors were detected while saving . Microsoft Excel may be able to save the file by removing or repairing some features. To make the repairs in a new file, click Continue. To cancel saving the file, click Cancel.”

When you click Continue, the repair fails.

Excel2007 or 2010: Excel crashes if you try to insert a new Excel worksheet instead of trying to save the file.

Solution

If you encounter this error, you can save your data in a new Excel document or discard the changes and repair the original document:

Save your data in a new Excel document

To save changes you made to your document, copy the worksheets you changed to a new Excel document and save it.

Repair your Excel document to avoid this error in the future

You can repair your Excel document by deleting any Visual Basic for Applications (VBA) projects from your document.However, simply deleting them in the Visual Basic editor is not sufficient.Please use the following procedure:

Create a backup of your document.Open your document in the Structured Storage Viewer.In the tree view of your document, select_VBA_PROJECT_CUR and press Del to delete it.Confirm deletion and close the Structured Storage Viewer.Open the document in Excel.There will be a dialog box Microsoft Visual Basic→ File not found. Hit OK.There will be another dialog box Repairs,with Lost Visual Basic projectlisted. Hit Close.Save your document.

Xem thêm:

You should now be able to delete the worksheet with upes2.edu.vn links and then save the document.

Leave a comment

Your email address will not be published. Required fields are marked *