Problem

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

Bạn đang xem: In excel: "errors were detected while saving

You delete the Excel worksheet where upes2.edu.vn"s Excel data links 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 tệp tin by removing or repairing some features. To lớn make the repairs in a new file, click Continue. Khổng lồ cancel saving the file, click Cancel."

*
When you click Continue, the repair fails.

Excel2007 or 2010: Excel crashes if you try lớn insert a new Excel worksheet instead of trying to lớn 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 và A2 on the first worksheet, Sheet1.Select the cells A1:A2 on Sheet1 và press Ctrl + C to copy.(Only if you try to lớn reproduce with Excel2013 or later: Insert a second worksheet. Older Excel versions have three default worksheets, so this is not required).Press alternative text + F11 to mở cửa 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 & click Delete.

Xem thêm:

Try to lớn save the Excel file. Excel shows an error message: "Errors were detected while saving . Microsoft Excel may be able lớn save the file by removing or repairing some features. Khổng lồ 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 lớn insert a new Excel worksheet instead of trying to lớn save the file.


Solution

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

Save your data in a new Excel document

To save changes you made khổng lồ your document, copy the worksheets you changed to lớn a new Excel document và save it.

Repair your Excel document to lớn 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 khổng lồ delete it.Confirm deletion & 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.

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