English

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

Cause

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 2003 are analogous:

  1. Open Excel,
  2. select DeveloperVisual Basic and close appearing 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. in Excel, right-click Sheet1 tab → Delete,
  8. select Office Button Office ButtonSave As and enter any filename,
  9. the message Errors were detected while saving ... appears. In Office 2003, Document not saved appears.

Solution

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.