Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have noticed that when I have multiple workbooks open with MS Excel and I close one, excel will attempt to close them all. This is extremely frustrating and has resulted in me losing work on many occasions.

Is there any way that I can stop Excel doing this so that it functions similar to MS Word?

I am using Excel 2003 SP3.

edit: i am aware that i can use the smaller 'x' button, however I was looking for a way to change current functionality of the main 'X'


share|improve this question
up vote 5 down vote accepted

I agree, it is annoying. Best I've found is to treat the workbooks as "tabs", and use Ctrl + W to close only one.

Or click the x close button, not on the very top but the lower one for the workbook.

alt text

share|improve this answer
I am aware that I can do this, it just takes some getting used to - I'm a big fan of consistency :( – JT.WK Dec 9 '09 at 1:57
Haha, a race to the finish :) – Jared Harley Dec 9 '09 at 1:57
Jared- just seconds in it, as so often! – outsideblasts Dec 9 '09 at 2:09
JT- I agree about consistency, might it help to imagine it as being in the same "family" as a browser? – outsideblasts Dec 9 '09 at 2:10

Excel has what is known as an MDI (multiple document interface) window, which means that all of your open spreadsheets are in a single, main Excel window.

When you're exiting a spreadsheet, are you clicking the large close X button at the top of the window, or the smaller X close just below it? The one on top is the Excel close, and the one below is the spreadsheet close.

Excel close buttons

share|improve this answer
i am clicking on the large one, ie the main window. It is interesting how it behaves "normally" when the workbooks have never been saved. – JT.WK Dec 9 '09 at 1:54

Here's a solution: Open new workbook, hit Alt+F11 to open VB editor, doubleclick ThisWorkbook in the Project Explorer pane and paste this code:

Private Sub Workbook_BeforeClose(bCancel As Boolean)
    If Workbooks.Count > 1 Then
        bCancel = True
     End If
End Sub

Save it as CloseFix.XLA file (Excel add-in), it should automatically save it in the add-ins folder. Activate it in the Tools->Add-in menu. From now on, if you have more than one Excel window, they will behave as standalone windows.

share|improve this answer

One alternative is to always open a new instance of Excel for each workbook you open. That way, the Excel MDI, as Jared called it, will only handle that one workbook. When you close it, you'll still have the others on your task bar.

To do this, first open Excel from your usual shortcut for the app, and then open a workbook from inside Excel. If you open a workbook on its own, it will always in the most-recently touched instance of Excel that's already open.

The downside to this is having to remember to always do this, and also then you won't have the option to close them all at once when you do want to do that.

Good luck. :)

share|improve this answer

You can also right click on the excel instance that you want to close in the taskbar which will bring up a menu that has a Close Option. Selecting this option will only close the instance that you have right clicked on. Hope this helps.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .