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:

  1. Open Excel.
  2. Press Alt+F11, then close the appearing Microsoft Visual Basic for Applications window.
  3. Enter 1 into cell A1.
  4. Mark cell A1 and press Ctrl+C.
  5. Open Word.
  6. Select HomePaste SpecialPaste linkMicrosoft Office Excel Worksheet ObjectOK.
  7. Only for Excel 2013: Insert a new worksheet.
  8. In Excel, right-click Sheet1 tab → Delete.
  9. Select Office Button Office ButtonSave As and enter any filename.
  10. 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:

  1. Make a backup of your document file.
  2. Download and run the free Structured Storage Viewer.
  3. Open your document in the Structured Storage Viewer.
  4. In the tree view of your document, select _VBA_PROJECT_CUR and press Del to delete it.
  5. Confirm deletion and close the Structured Storage Viewer.
  6. Open the document in Excel.
  7. There will be a dialog box Microsoft Visual Basic → File not found. Hit OK.
  8. There will be another dialog box Repairs, with Lost Visual Basic project listed. Hit Close.
  9. Save your document.

You should now be able to delete the worksheet with think-cell links and then save the document.