KB0062: When saving an Excel file, a message "Errors were detected while saving ..." or "Document not saved" pops up and the document is not saved
This problem happens after deleting a worksheet containing think-cell links. It is caused by a bug in Excel. When contacting Microsoft Office Support for a fix, you may refer to our service request SRQ090126600720. The bug can be reproduced without think-cell. The following steps are for Office 2007, but the actions for Office 2010 and 2013 as well as Office 2003 are analogous:
- Open Excel.
- Press Alt+F11, then close the appearing Microsoft Visual Basic for Applications window.
- Enter 1 into cell A1.
- Mark cell A1 and press Ctrl+C.
- Open Word.
- Select Home → Paste Special → Paste link → Microsoft Office Excel Worksheet Object → OK.
- Only for Excel 2013: Insert a new worksheet.
- In Excel, right-click Sheet1 tab → Delete.
- Select Office Button → Save As and enter any filename.
- The message Errors were detected while saving ... appears. In Office 2003, Document not saved appears.
To save changes you made to your document, copy the worksheets you changed to a new Excel document and save it.
You can repair your Excel document so that this problem does not happen again if you delete any Visual Basic for Applications (VBA) projects. Simply deleting them in the Visual Basic editor is not sufficient. Please use the following procedure:
- Make a backup of your document file.
- Download and run the free Structured Storage Viewer.
- 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 project listed. Hit Close.
- Save your document.
You should now be able to delete the worksheet with think-cell links and then save the document.