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

Adjusting a Range's Starting Point

Select a range of cells, and one of those cells will always be the starting point for the range. This tip explains how to ...

Discover More

Changing Gridline Color

Gridlines are very helpful in seeing where cells are located on the screen. You are not limited to black gridlines; ...

Discover More

Searching for Styles

If you use styles to format your text, you can later search for words and phrases that are formatted using various ...

Discover More

Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!

More ExcelTips (ribbon)

Excel Not Responding

Have you ever been working with data in Excel and experienced a "freeze" where the program stops responding? This can be ...

Discover More

Turning Off Sharing

All good things must come to an end at some point. When you are done sharing your workbook with others, this is how you ...

Discover More

Who Has the Workbook Open?

When you are working with workbooks to which multiple people have access, it can be helpful to know who has a particular ...

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 9 + 2?

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.