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

Selecting Fonts for a Chart

When formatting a chart, you might want to change the characteristics of the font used in various chart elements. This ...

Discover More

Entering Dates without Separators

When doing data entry into a worksheet, you might want to enter dates without the need to type the separators that are ...

Discover More

Empty PivotTable Cells Don't Show as Blank

You can configure Excel so that it displays special text within blank PivotTable cells. Here's how to make the changes ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

More ExcelTips (ribbon)

Changing Links

If your worksheet is linked to data in other worksheets, you may need to change the link from time to time. Here's how to ...

Discover More

Limiting Where a Workbook is Used

Want to limit who can use your workbook and on what system? Locking down a workbook can be trickier than you might imagine.

Discover More

Viewing Workbook Statistics

Excel keeps track of a range of stats about each workbook you use. If you want to take a look at those stats, it's easy; ...

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 6 - 0?

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.