Close Window   
Free Ebook
Get Your Free Excel
Our Top 15 Excel Tutorials
Instant Access!
Subscribe for Free Excel tips & more!

Worksheet Says Locked For Editing By A User Who Is Not In Workshe.

Forum Register
Search Excel Forum Posts, Tutorials, Macros, Tips, and More

I keep getting a message that a worksheet is locked by another user who is
not using that worksheet. I've tried shutting down etc. with no luck. Thank
you in advance for any help.

View Answers     

Similar Excel Tutorials

Prevent a User from Changing Any Data in Excel
I'll show you how to lock a spreadsheet so that nothing can be changed in it. This is a great feature to use when ...
Hide Formulas in a Worksheet and Prevent Deletion
This macro will hide all formulas within a workbook and not allow them to be deleted. The page will not be protect ...
Add Notes and Comments to Cells in Excel
Did you know that you can add notes and comments to any cell in Excel? You can write reminders, important notes, ...
Allow Only Certain People to Edit Specific Cells in Excel
How to allow only certain people to edit certain cells or ranges in Excel. This is a security feature that you can ...

Helpful Excel Macros

Pop-Up Message Box When a Cell Reaches a Certain Value or Contains Certain Text
- This macro will display a message box in excel when a cell reaches a certain value or contains certain text. This means
Add an Input Message to a Cell - Message Appears When the Cell is Selected in Excel - Data Validation Macro
- Add data validation input messages to cells in Excel with this free Excel macro. These messages appear when a specific
Pop-Up Message Box When a Range of Cells Reaches a Certain Average
- This macro will display a message box when the numbers within a range of cells reaches an average of 5. The current mac
Output the Worksheet Name in a Cell in Excel - UDF
- UDF to return the name of the worksheet in Excel on which this function is located. There are no arguments for this fun
Print The Current Worksheet in Excel
- This free Excel macro will print the current active worksheet in Excel. This means that whatever sheet you are currentl

Similar Topics

I'm currently running a shared spreadsheet between 14 office managers. Whenever one manager is editing and another tries to open the document we get a "locked for editing by 'user'" message.

Is there anyway to change 'user' to the actual user id.

We have 250 users total. excel was installed from a network image.

Thank you for your time.

I have cells that are locked and the worksheet and workbook are password protected. Is it possible to suppress the Excel message (ie the one that says the cells are locked and hence read only. To unlock need to unprotect sheet first ...) when those locked cells are clicked or when one wants to change the content in the cell?

Or alternatively, if the message can't be suppressed, can I write some code that will automatically click OK to that message, but then once the OK button is pressed, it will display my own customised message to give instruction to the user to do something else?


I'm looking for the simplest way to lock/protect a worksheet such that:

1) The user edit cells designated with that permission (some cells will need to be locked, others permitted for editing the value)
2) The user has no other privileges on that sheet.

PS 1: It would be helpful if rather than allowing cells one by one I could specify ranges of editable cells.
PS 2: I don't mind if the format of the cell is locked or not, but would be nice to know how to allow/disallow this for the cells who's values can be edited.

Any help greatly appreciated

Thanks in advance

I think I have been asking the incorrect question in previous posts. I have 70 files on a shared drive that I run 1 Macro on. However, sometimes my co-workers are working in the documents and I'll get a "NYC is locked for editing" message. When this happens, I have to re-run my entire Macro all over again. Is there a way to see if any of the workbooks I am trying to open and run a my Macro on are "locked for editing". If any are locked for editing, then I would want to exit sub before running my main Macro. I have all of the file paths in a workbook in column A. Thanks in advance



Situation : Windows XP Sp2 clients with Office 2003 Sp2 and Samba Domain:
(running Red Hat Enterprise Linux AS release 3 with Taroon Update 7)

On a random share are some XLS documents opened with Excel 2003.
When I open for example document.xls with user “X” (username filled in in
Excel General Options > User name) user “Z” cant open the document because
the document is locked.
Normally the username of the user who has the document open will show up,
when you try to open a document which is already opened.

But in this case, the username shown in “Document.xls is locked for editing
by random name” isn’t really the person who has the document open, it shows
the username who LAST SAVED the document, or in some cases, the user who has
last opened the document.

For example: Document.xls, last saved and closed by user “X” (shown in the
properties of the document) is being opened by user “Y” (also shown “Y” in
EXCEL user options). User “Y nor saves or closes the document, just opens it.
When user “Z” now tries to open the document, a message wil appear:

“ File in Use “
“document.xls is locked for editing by “X”

But user “Y” has the document open, not user “X” …

This is really frustrating some people here, because they don’t know who
really has the document open.

Anyone familiar with this situation ?
For more info please ask.

Using Active Directory, MS clustered file server, Office 2003

When a group of users access the same file, of course they get a
message stating that
the file is locked by some other user and it usually gives the person's
name that has the
file locked. The exception is that when a particular user has the file
locked, it does not
give that person's name, it simply says 'Nursing'. Since the word
nursing does appear
anywhere in the user's active directory property sheet, I was hoping
somebody could
tell me where excel is getting the data for the user who has the file

Thanks in advance,


Hi, I don't know if this is the correct thread, but here goes.

When users try to access a shared Excel workbook from the server, we get a message saying that the file has been locked for editing by "username". The only problem is that the file has already been closed by the user.

I can go to computer management and release the share of that file, but I'm looking for a fix to avoid any user intervention.

This has been going on for the last couple of days and is driving me nuts.

Any suggestions?

Here is my Dilemia

I have a worksheet that has been designed to allow the user to enter data, in certain cells of the worksheet are formula to do automatic calculations as the user enters data. Here is my dilemia

a) I need the cells with the formula's to be locked so the user cannot delete or alter them.
b) In cases there may be a case where rows will have to be deleted or inserted, depending on the data entered.
c) The sheet needs to be protected to avoid the user from altering the sheet i.e. design etc.

I have found the problem is that i can lock out all the cells that i do not want the user to alter, and i can protect the worksheet and allow users to have certain edit right. But the problem i am facing is that when you have locked or protected cells on a wprksheet and you protect the sheet, then you can not delete or insert rows.

Is there a way that allows the sheet and formula to be locked, but also allow the user to delete or insert rows if they need...???

I hope this explains every thing...

Sorry for some reason pc acting funny and posted this twice...

I have written a usage log into a spreadsheet to see who is entering the sheet, this is fine but some user names are not shown, only the time they entered, all macros are activated but there name is hidden, why is this?

Also if someone is in a sheet no matter what worksheet they are in and i try to go in, it comes up read only, but instead of it saying, "The sheet is locked for editing by FBF" i says " The sheet is locked for editing by ."

Anyone got any answers please



Ladies and Gentlemen:

In my worksheet, I have a column with all cells in that column locked
(It is a must and I CAN NOT unlock any cell in that column). There are
a few cells UNDER OTHER COLUMNS unlocked for user to input their data.
Then the whole worksheet is password-protected. My question is how to
allow user to copy one ROW and paste it into another row without
unprotect the worksheet? Please keep it in mind that there is at least
one cell in EACH ROW locked where user CAN NOT modify the value in that

Thanks for your help!


Hi everyone,
I am trying to design a worksheet so some of the cells will be locked for editing but others the user will be able to type in freely. When I protect the sheet, everything gets locked down. How do I specify which cells I want protected?


Heres a question.

Is it possible by VBA or other means to allow a user to format cells within a protecetd worksheet.

I jave a worksheet which has locked cells and is also protect, to protect formula's

What i would like todo is on the cells that the user can enter data, is to allow them to use the Undeline, Bold, and Italic functions only.

Is this possible


file locked for editing , can I kick the other user out if its my file?

I have made an excel file where other people have to go in and update it. This process takes 2 secs but some people forget and stay in it over lunch etc causing a great annoyance.
Is there anyway I can "kick" them out my file? Im not concerned if they lose any data they've entered as I'm sure this will help them get the message to get out the file quicker..
Its really doing my head in... pls help

Looking for a way to unlock a shared excel workbook on a network drive. It currently states that a user has the file locked for editing which he does not. He is not in the file and he has already rebooted his machine. I cannot save as and write over the existing file because the file is supposedly "In Use" by the person whom it claims has it locked for editing. I cannot save as a new name because over 200 people use this file and are already mapped to its home location. Help!?

I have created two macros, one to lock a worksheet, and another to unlock it. I inserted two form control buttons at the bottom of the worksheet, and assigned the macros to the buttons. So now I can toggle between a locked and unlocked worksheet. But I can't tell if the sheet is locked or not.

Now I would like to be able to see if the worksheet is locked or not. Ideally, I'd like one button that toggles the worksheet protection on and off, and the word in the button changes between "Locked" and "Unlocked". Or, I can still use two buttons, perhaps with the "Locked" word or "Unlocked" word changing color so that I can tell the locked status.

Any help appreciated!


I was wondering if i could get some help with my problem. In a workbook, i have two worksheets, namely, Schedule and Control.

I have VBA codes written in worksheet "Control". The problem i'm having is that i was trying to stop users from editing a certain number of cells in worksheets "Schedule" but not all the cells.

For example, Cells from D10 to F30 are to be locked (not allowing to be edited) but users can edit cells from G10 to I30 in worksheet "Control".

So i have a simple code written in "Control" worksheet but got error message saying "method data not found".

Worksheets.Range("D8:F10").Locked = true

Thank you in advance

I have locked all of a worksheet, except for a data entry portion. During
the locking proceedure, excel appears to give options for allowing the user
permission to use certain functions while the worksheet is locked, such as
"sort". However, that is not being allowed. Any ideas?


We have a template we are distrubting to users. We have locked and unlocked cells (with a protected worksheet).

The issue is, after the user enters data on a unlocked cell and the user hits "enter" 1 of 2 things happen:

1. the active cell goes to the next cell below it
2. The active cells randomly goes to a new cell (or random from what I can see)

Anyone have any ideas?

The locked/unlocked cells dont really have a pattern in what rows and collumns are locked/unlocked.

Thanks for any ideas!


What I have is a worksheet which is protected with certain cells unlocked for editing, what I require is to change the standard Microsoft Excel message box to a message of my choice if anyone tries to edit a locked cell i.e. from :-

The Cell or chart you are trying to change is protected and therefore read-only

To Modify etc etc etc

To a message of my choice e.g. (Sorry No Can Do !)

Any help would be greatly appreciated


N.B Excel version 2003

Hey Guys,
I have a weird error occurring.

So I just finished a spreadsheet with userforms and vba.
I've locked the cells but when i open it i get an error message.

File in Use
File.xls is locked for editing

By 'user'

Open 'Read-Only' or, click 'Notify' to open read-only and receive notification when the document is no longer in use.

The weird thing is, if i shut the laptop down, and open it after it restarts, I do NOT get the error. Its only when i close it again and try to reopen i get the error.

Ive made a new copy of it and it does the same thing! Any thoughts?

Hi there,

I got this worksheet which i will hide/unhide rows depending on user selection in a drop down list. However i do not want user to click on "locked cells". It work fine but whenever i save the document, the "locked cells" can be click. How do i disable the "locked cells" from being click? Any argument which i can add to unprotect/protect command?


sht.Unprotect Password:="abc"

... hide/unhide row....

sht.Protect Password:="abc"


I want to read from an Excel file on another computer in my network. But when I open it I get a message that the file "is locked for editing" as it is open on the other computer too. After I accept this, I can read the file.

Is it possible to disable this message? I can buy that the document is locked for editing, but I just don't want to get this message (I am trying to read the Excel file from Java using a JDBC-ODBC bridge, but the message disables me from doing so).

Sharing the Excel document is not alternative as it contains data tables.

Hi All,

Wondering if any one has seen this before. Normaly if you try to access an excel file when someone is already in it you will get a message saying it's locked for editing by... however there seems to be one user here who is constantly going it to files, then when other people go in after her they don't get a message about the file being locked.

It's not just the one file and when other people go in after her she can't save so I'm guessing it's nothing to do with the shared work book feature? so has anyone else come across something like this before? is there any way of checking if Excel is reserving the right for her to edit the file when she goes?

Morning All,

I have some formulas which are protected, so Ive put a password on the sheet. Problem is that I want the user to be able to delete rows... when I try and delete a row with the protection on I get the following error.

You are trying to delete a row that contains a locked cell. Locked cells cannot be deleted while the worksheet is protected.

Is there any code I can use to get around this? My protected columns are A and some of D.


Ctrl PgDn takes you to the next worksheet if Worksheet protection is OFF, or if it is ON and the whole sheet is locked. However I have a workbook with some sheets where I have a mixture of locked and unlocked cells to control user input, and Ctrl PgDn does not work in the same way.
Can anyone tell me how I can force Ctrl PgDn to still take user to next sheet in this situation.