Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Saving All Open Workbooks.

Saving All Open Workbooks

by Allen Wyatt
(last updated October 26, 2015)

5

If you work with lots of workbooks open at the same time, you know that it can be a pain to go through and save each of the open workbooks, in turn. Wouldn't it be great to have a single command that allowed you to save all the open workbooks, without the need to do it manually?

Unfortunately, there isn't such a command. The closest solution is to hold down the Shift key as you click the File menu, then choose Close All. In the process of closing, Excel will ask if you want each workbook saved.

The big drawback to this is that Excel closes and you need to again start Excel and open all your workbooks. If you want a true Save All command, you need to create it using a macro. The following is a good example of one you could use:

Sub SaveAll()
    Dim Wkb As Workbook
    For Each Wkb In Workbooks
        If Not Wkb.ReadOnly And Windows(Wkb.Name).Visible Then
            Wkb.Save
        End If
    Next
End Sub

Save the macro in your Personal workbook, assign it to a toolbar button or a shortcut key, and you can call it up as often as you like. It saves all the workbooks that are open, except those that are read-only or hidden.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (3307) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Saving All Open Workbooks.

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

Modifying Proper Capitalization

The PROPER worksheet function is used to change the case of text so that the first letter of each word is capitalized. If ...

Discover More

Replacing Characters at the End of a Cell

The Find and Replace capabilities of Excel can come in handy, but they can't accomplish all your replacement needs. One such ...

Discover More

Getting the Names of Defined Bookmarks

When creating a macro, you may need to determine the names of the bookmarks in the document. You can do this using the ...

Discover More

Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!

More ExcelTips (menu)

Don't Update Links to Other Programs

If you have links in your workbook to data in other workbooks, you may want to control whether Excel updates those links or ...

Discover More

Adding a File Path and Filename

If you need to stuff the current workbook's filename and path into a cell or a header or footer, you'll appreciate the ...

Discover More

Importing Multiple Files to a Single Workbook

If you use Excel to work with data exported from another program, you might be interested in a way to import a large number ...

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. 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 six less than 6?

2016-06-02 01:42:02

Vicki

Many thanks, much needed.


2016-04-19 09:58:22

Vanamali

Try to Save Workspace from View tab. This would save all the currently open worksheets and also let you save all the unsaved workspace, without closing any of the worksheets.
One more advantage is, even if you close all the tabs, you could open all the above worksheets by opening the workspace file .xlsw


2016-03-31 14:32:56

Stephen Golden

Thanks for the tips for newer versions of Excel! I just upgraded to 2016 from 2003, and I'm amazed at how many useful features are either hidden or gone completely. I implemented the SaveAll macro, and I must have done something squirrelly because, even though it saves all the open workbooks, it leaves PERSONAL.XLSB open. Do you know what I did wrong and how I can fix it?


2015-12-28 16:10:43

Rick Bajackson

Mr. Wyatt,

Thanks a lot for your tip on how to save all the open Excel spreadsheets with one command. I've been a user of Excel and prior to that Multiplan for a long time but missed the "upgrade" where MS decided that having one command to save all the open spreadsheets was a "waste of space".

Once again, thanks for the effort and then publishing your macro.


2011-12-03 15:42:52

Ivan

Hi,

Very useful macro. I immediately transferred it into my growing library that I have maintained for many years. I had other workbook-related macros, but not an explicit SaveAll. The SaveAll is very elegant.

My library started with a macro from 'Source Wrox, John Green: Excel 2000 VBA, Chapter 12, Page 207' as an example. I still use the book although I am on Excel 2010.

You may be interested that after a 32 year career with IBM in system development and retiring 23 years ago, I switched to Apple, and am running Windows 7 under Apple's OS X Lion, on a 17" MacBook Pro.

A non-related question: More than a decade ago I changed over to the R1C1 notation in Excel, and would never consider going back to the A1 notation. How do you feel about R1C1? I don't know whether anybody is using it. A thread on this subject would be interesting.

Ivan R.


This Site

Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon 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.