XL7: "File Is Locked" Saving or Closing Shared File

Last reviewed: October 13, 1997
Article ID: Q129276

The information in this article applies to:

  • Microsoft Excel for Windows 95, version 7.0

SYMPTOMS

In Microsoft Excel, when you save or close a shared workbook, you may receive the following error message:

   File is locked. Please try again.

CAUSE

This behavior may occur when the shared workbook is open in Microsoft Quick View or when you are attempting to save the workbook while another user is opening the file in Microsoft Excel.

Case 1: The Shared Workbook Is Open in Microsoft Quick View

This behavior occurs if the file you are saving or closing is open in Microsoft Quick View. Quick View is a program that is included with Microsoft Windows 95. Quick View allows you to view a document without opening it in the program that was used to create the document.

When you open a nonshared file in Microsoft Excel, you cannot open the same file in Microsoft Quick View because the file is locked by Microsoft Excel. However, when you open a shared file in Microsoft Excel, the file is not locked (to allow sharing), and you can view it in Microsoft Quick View. When you save or close a shared file in Microsoft Excel, Microsoft Excel locks the file for saving. If you save or close a shared file in Microsoft Excel while the file is open in Quick View, you receive the error message in the "Symptoms" section because the file is locked by Quick View in this case.

NOTE: If you open a shared file in Microsoft Excel, set the file attributes to read-only (from the folder window that contains the file) while the file is still open, and then save or close the file, the error message appears.

Case 2: Another User Has Opened the Shared Workbook

This behavior occurs when you save a shared workbook and another user has already opened the workbook. The error message may also appear if you share a file while another user is opening the file because sharing a file requires that you save it.

WORKAROUND

To work around this behavior, use the appropriate following method.

Method 1: The Shared Workbook Is Open in Microsoft Quick View

Close the file in Quick View before you attempt to save the shared workbook.

Method 2: Another User Has Opened the Shared Workbook

Wait a few minutes and save the file again. The number of minutes to wait depends on the size of the file and how long it takes to open the file. As soon as the file is opened on the other user's computer, you can successfully save the file without receiving the error message.

MORE INFORMATION

In Quick View, when you open a nonshared workbook file that is currently open in Microsoft Excel, you receive the following error message:

   The file <filename> can not be opened for Quick View. It may be opened
   or locked by another application or you may not have access to it.

When you open a file in Microsoft Excel, the file is opened exclusively whether the file is shared or not. After you open the file, if the file is shared, the file is considered nonexclusive. If you attempt to save a file in Microsoft Excel while another user is opening the file (another instance of Microsoft Excel is reading the same file), your instance of Microsoft Excel is unable to lock the file to save it, and you receive the error message described in this section.


Additional reference words: 7.00
Keywords : kberrmsg kbinterop kbinterop
Version : 7.00
Platform : WINDOWS
Issue type : kbprb
Solution Type : kbworkaround


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 13, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.