+ Reply to Thread
Results 1 to 4 of 4

File Locked for Editing When Not Open

  1. #1
    Registered User
    Join Date
    01-27-2010
    Location
    Alabama
    MS-Off Ver
    Excel 2003
    Posts
    8

    File Locked for Editing When Not Open

    I am consistently running into an issue where I attempt to open an Excel files and I get the following popup:

    "thisFile.xls is locked for editing by 'me'. Open Read Only or Notify"

    The problem is, the file is on my C drive, so it's not shared by anyone, and I don't have it open. As a matter of fact, I just closed it.

    The problem is only fixed when I either reboot my PC or open as read only and save a new copy under a new name.

    Any ideas on what's making Excel think a closed file is still open?

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: File Locked for Editing When Not Open

    It sounds like it is not closing properly. Is there any code in the workbook,maybe also check if it is listed in the VB Editor when the workbook is assumed to be closed
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Contributor
    Join Date
    02-25-2010
    Location
    Boston
    MS-Off Ver
    Excel 2007
    Posts
    174

    Re: File Locked for Editing When Not Open

    This is a tough problem - A few things I would consider:

    1. Look at your task manager and make sure no Excel files are erroneously open
    2. Is Powerpoint open and is anything linked to the excel file in question?
    3. Ensure it is not a shared workbook and that your C drice location is not shared.

    I have had problems with this before but it was on a server and for some reason the server had the task still open without anyone viewing the file.

  4. #4
    Registered User
    Join Date
    01-27-2010
    Location
    Alabama
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: File Locked for Editing When Not Open

    Quote Originally Posted by royUK View Post
    Is there any code in the workbook,maybe also check if it is listed in the VB Editor when the workbook is assumed to be closed
    Thanks for the quick replies guys.

    I actually do have some VB code in the workbook. I'm not sure where I would start troubleshooting though, I can open the file and close it back it 20 times before it happens.

    I have some code that executes on workbook close:

    Private Sub Workbook_BeforeClose(Cancel As Boolean)

    ActiveWorkbook.Protect passwordConstantPlaceHolder, Structure:=True, Windows:=False

    End Sub
    I tried looking in the VB editor to see if the file shows as open and it's not there when it's supposed to be closed.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1