Closing Excel when Closing the Last Workbook

by Allen Wyatt
(last updated December 22, 2018)

2

Jim noticed something frustrating when he was wrapping up a session with Excel. When he opens a workbook, everything is fine and works great. When he closes the workbook by clicking the close button at the upper-right of the program window, the workbook closes but Excel remains open. There is no workbook open at this point; only a blank Excel program window. He has to close it explicitly, which means an extra step when closing down Excel. He wonders if there is a way to make Excel close completely when he closes the last workbook on which he is working.

Before getting into theories and workarounds, it is good to review a bit about close buttons. Actually, in Excel 2007 and Excel 2010 there are two close buttons near the upper-right corner of the screen. One is red; if you hover the mouse over it, the ToolTip simply says "Close." This is the close button for Excel itself. The other is not red; if you hover the mouse over it, the ToolTip says, "Close Window." This is the close button to dismiss the document window.

In Excel 2013 and later versions this changed. There is now a single close button at the upper-right of the screen. Hover over it with the mouse and the ToolTip says "Close." In other words, Microsoft has done away with the "Close Window" button in later versions of Excel. Interestingly enough, the problem that Jim describes has also been done away with; it only exists in Excel 2007 and Excel 2010, and then only on some systems. (I verified this on several systems; the problem occurs when you click the Close button—the red one. On the last workbook, on some systems, it closes the workbook window, but leaves the program window open.)

The prevailing theory as to why this occurs in Excel 2007 and Excel 2010 is that Microsoft changed the way the Personal workbook was handled. As the story goes, since the Personal workbook is always open (even when it is hidden), the Excel program window stays open because Excel senses that a workbook (the Personal workbook) is still open.

Nonetheless, it is still frustrating. There is a way around it, but it involves changing how you close workbooks and the program. Instead of clicking on the close icon (the red X in the upper-right of the screen), use the following shortcut keys:

  • Ctrl+F4. This shortcut closes the active window, meaning that it closes whatever workbook you are viewing. (This is the same as clicking on the non-red Close button.)
  • Alt+F4. This shortcut closes the active application—Excel—and any document windows it may have open.

It is this second shortcut that is the handiest for shutting down Excel. It is interesting to note that in Excel 2013 and later versions these keys do essentially the same thing—they close one Excel workbook at a time. Even though both shortcuts close one Excel workbook at a time, Ctrl +F4 leaves Excel open while Alt+F4 closes Excel after the last workbook is closed. This is a completely different behavior than in earlier versions of Excel.

You could also try a modification on your red-X-clicking routine: Hold down the Shift key as you click. This modification has the same result as pressing Alt+F4, closing Excel and all open document windows.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (11315) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Office 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

Having Numbered Lists in Subdocuments Restart their Numbering

If you have a bunch of subdocuments, and each of those subdocuments contains numbered lists, you may find that you have ...

Discover More

Find and Replace in a Column or Row

Need to search for information in a table? Word allows you to easily limit your search to an entire column or row, as ...

Discover More

Hiding a Chart's Legend

When you create a chart, Sheets helpfully adds a legend to better explain the data that is in the chart. You may not want ...

Discover More

Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!

More ExcelTips (ribbon)

Frequent Workbook Recovery Prompts

When you open a workbook, Excel examines that workbook to make sure it can understand the data it contains. This can lead ...

Discover More

Creating New Windows

If you need to look at different parts of the same worksheet at the same time, the answer is to create windows for your ...

Discover More

Starting in Safe Mode

By using a command-line switch, Excel can be started in safe mode. This means that the program is loaded with bare-bones ...

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}] 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 0 + 4?

2018-12-31 04:57:54

Mike Hodkinson

Simple solution:
If you don't want Excel to close when closing the last / only workbook open just use CTRL + W which closes the workbook but not the application.


2018-12-22 11:31:03

Joe

Good tip Alan. In the past i have used Control+W to close workbooks and then finally do the Alt+F4 on the empty application window. You have convinced me to use Alt+F4. I used Control+W because it worked for MS Word. But Alt+F4 works too.


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.