Stop MS Excel 2003 closing all open workbooks

2

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'

Cheers!

JT.WK

Posted 2009-12-09T01:47:16.910

Reputation: 1 928

Answers

5

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

outsideblasts

Posted 2009-12-09T01:47:16.910

Reputation: 6 297

1I am aware that I can do this, it just takes some getting used to - I'm a big fan of consistency :( – JT.WK – 2009-12-09T01:57:11.803

Haha, a race to the finish :) – Jared Harley – 2009-12-09T01:57:49.167

Jared- just seconds in it, as so often! – outsideblasts – 2009-12-09T02:09:41.717

1JT- I agree about consistency, might it help to imagine it as being in the same "family" as a browser? – outsideblasts – 2009-12-09T02:10:18.923

3

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

Jared Harley

Posted 2009-12-09T01:47:16.910

Reputation: 11 692

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 – 2009-12-09T01:54:27.830

2

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
        ActiveWorkbook.Close
        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.

T800

Posted 2009-12-09T01:47:16.910

Reputation: 21

0

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. :)

Peter

Posted 2009-12-09T01:47:16.910

Reputation: 290

0

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.

GrUnT

Posted 2009-12-09T01:47:16.910

Reputation: 1