This file is locked for editing
Microsoft Microsoft Office
Severity: MinorWhat Does This Error Mean?
This message means the file you are trying to edit is currently being used by someone else — or Office thinks it is. When someone opens a shared file, Office creates a lock so two people do not accidentally overwrite each other's changes. The lock can also get stuck after a crash, leaving the file appearing locked even when no one is actually editing it.
Affected Models
- Microsoft Word 2016+
- Microsoft Excel 2016+
- Microsoft PowerPoint 2016+
- Microsoft 365
Common Causes
- Another person on your team has the file open and is actively editing it
- You had the file open on another device (like your laptop) and it did not close properly
- Office or your PC crashed while the file was open, leaving behind a ghost lock file
- The file is stored on SharePoint or OneDrive and the previous editing session did not save cleanly
- A backup or antivirus program has the file open in the background
How to Fix It
-
Check if a colleague actually has the file open. Office usually shows the name of the person who has it locked. Contact them and ask them to close it.
If a real person has it open, this is working as intended. You can click Notify Me and Office will alert you when they close it.
-
If you believe no one has the file open, look for a lock file in the same folder. It will be named ~$ followed by the original filename (for example, ~$report.docx). Delete this lock file.
Office creates a hidden ~$ file when a document is open. If the app crashed, this file stays behind and keeps the document appearing locked. Deleting it releases the lock.
-
Check if you have the file open on another device — your phone, a second laptop, or a tablet. Close it there and the lock will release.
Microsoft 365 tracks open sessions across devices. An unclosed session on your phone can lock a file for everyone else.
-
If the file is on SharePoint, open it in your browser at sharepoint.com, click the three-dot menu next to the file, and choose Close Session or Discard Changes.
SharePoint has a built-in session management feature that lets you clear a stuck lock without IT help.
-
Open the file in read-only mode to access your data, then save a copy with a new name using File > Save As. You can now edit the copy freely.
This is the fastest workaround when you need to make changes urgently and cannot wait for the lock to clear.
When to Call a Professional
If this is a shared business file and you believe the lock was left by a former employee or system error, your IT department can clear server-side locks on SharePoint or OneDrive. They can also check the file's version history to see who last had it open.
Frequently Asked Questions
What is the ~$ file and is it safe to delete it?
The ~$ file is a temporary lock file that Office creates when a document is open. It contains information about who has the file open and prevents others from editing at the same time. If the person who opened the file has closed it (or their app crashed), the ~$ file may be left behind as a ghost. Deleting a ghost ~$ file is completely safe. Never delete it if someone is actively editing the document.
Two people in my team need to edit the document at the same time. Is that possible?
Yes — if the file is stored on OneDrive or SharePoint. Microsoft 365 supports real-time co-authoring, which lets multiple people edit the same document simultaneously. Each person's changes appear in different colors so you can see who changed what. For this to work, make sure the file is saved to OneDrive or SharePoint, not a local drive.
The file says it is locked by me, but I am not editing it. Why?
Your Office session on another device or browser tab likely did not close cleanly. Check all your devices — phone, tablet, other computers. Also check if you have the file open in a browser tab at office.com. Closing all those sessions will release the lock. If that does not work, find and delete the ~$ lock file from the folder.