Incorrect In-Use Message

Written by Allen Wyatt (last updated February 2, 2024)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365


5

Every time Kevin opens one particular Excel workbook, he sees a notice that the "file is in use" and is locked for editing, with the username being his own. He knows he doesn't have this workbook open. He's saved the workbook under a new name, but he still gets the same "in use" message when opening the new file.

There are a couple of things that may be causing the issue. The first thing to check is to get out of Excel and see if there is a "semaphore file" for the workbook. When you first open a workbook, Excel creates the semaphore file to indicate that the workbook is in use. This file is essentially the name of the opened workbook preceded by a tilde and a dollar sign. Thus, if you open a file named MyFile.xlsx, then the semaphore file will be named ~$MyFile.xlsx.

The semaphore file should be automatically deleted when you close the workbook with which it is associated. If something interferes with deleting the semaphore file, then the next time you open the workbook, it will show as "in use."

Go ahead and get out of Excel, then use Explorer to navigate to the folder in which the workbook is stored. Check to see if the semaphore file is in that folder. In order to see any left-over semaphore files, you'll need to make sure you have Windows configured to display all hidden files. (Semaphore files are hidden, by default.) If you see the file, simply delete it, and you should be fine on restarting Excel.

Another possible cause of the problem is the way that Windows Explorer interacts with files. A popular way to use Explorer is to leave the Preview pane open at the right side of the Explorer window. With the pane turned on, you are shown a preview of whatever file you have selected in the Explorer window. In order to display the preview, Explorer must open the file, and this can cause "false positives" if you have a workbook selected and you try to open the workbook through Explorer.

The solution in this situation is to simply get out of Explorer and open the workbook or close the Preview pane in Explorer. Either way should allow you to open the workbook just fine.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (13692) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Aligning Cells when Importing from CSV

When you import information from a CSV text file, Excel formats the data according to its default settings. Wouldn't it ...

Discover More

Inserting the Document Revision Number

Need to know how many times your document has been saved? Word keeps track of this information, and makes it easily ...

Discover More

Examining Styles and Macros in a Template

Templates are very powerful with the ability to contain both styles and macros. If you want to see what styles and macros ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More ExcelTips (ribbon)

Reducing File Size

As you work with a workbook (particularly one that contains macros) you may notice that the workbook size can become ...

Discover More

Opening a Workbook to a Specific Worksheet

When you open a workbook, Excel displays the worksheet that was visible when the workbook was last saved. You may want, ...

Discover More

Strange Message about Others Making Changes in a Workbook

Have you ever tried to save a workbook, only to be notified that someone else has made changes in it? What if you are the ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 2 + 8?

2024-02-03 10:58:32

J. Woolley

My Excel Toolbox includes the following dynamic array function:
=ListUserStatus([SkipHeader])
This function lists name, last activity (date/time), and type (exclusive/shared) for each user that has the formula cell's workbook open.
When using pre-2021 versions of Excel without support for dynamic arrays, review the PDF file UseSpillArray.pdf.
See https://sites.google.com/view/MyExcelToolbox
Also, see https://excelribbon.tips.net/T013566_Who_Has_the_Workbook_Open.html


2024-02-02 07:43:53

Brian

When working on a network it can be useful to know if another user has a file open then who it is. From VBA it's easy to check if a semaphore file exists. If it does then the first byte will be a number and that subsequent bytes will be the name of the user as held in the Excel variable 'Application.Username' and held by the OS. So if for example the first 12 bytes of the semaphore file say ' Allen Wyatt'. Where is the character code for 11 - there's your user. I haven't yet managed to decode the other 153 bytes (it's always 165 bytes long).


2019-10-28 14:26:31

Christian Sommerhuber

Nice article, but I think the most frequent possibility is missing: when Excel crashes (what I see often) then the Excel task may still be active, although you can't see it on the screen. You need to start the task manager and if the task still persists you need to kill it in the task manager.


2019-10-26 17:03:24

David Gray

Thanks to the other subscribers who contributed to this article, I learned about another potential cause of this "in use" error. Since I have never used the Preview Pane, I've never experienced this variant, nor would it have crossed my mind.


2019-10-26 13:02:10

Raymond Wixom

When I have the Preview Pane open and try to save a file, I get a message that I have to rename the file or save it somewhere else. Close Preview Pane and I can save the file without further problems.


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.