Excel.Tips.Net Welcome toExcel.Tips.Net

Helpful Links

Tips.Net Home
ExcelTips Home
Ask an Excel Question
Make a Comment

Tips.Net Store

ExcelTips FAQ
ExcelTips Premium

Learn Access Now
Free Printable Forms

Beauty Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Legal Tips
Money Tips
Organizing Tips
Pest Tips
Pet Tips
Wedding Tips
Word2007 Tips
WordTips

Advertise on the
ExcelTips Site

Newest Tips

Recording a Macro

Adding a Little Animation to Your Life

Converting a Range of URLs to Hyperlinks

Making the Formula Bar Persistent

Engineering Calculations

Digital Signatures for Macros

Fixing the Decimal Point

 

Saving All Open Workbooks

Summary: Wouldn't it be nice to have a single command that would save each of you open workbooks, all at once? It's easy to do with the short macro presented in this tip. (This tip works with Microsoft Excel 97, Excel 2000, Excel 2002, Excel 2003, and Excel 2007.)

Users familiar with Word may remember that prior to Word 2007 the program contained a nifty shortcut that allowed you to save all your open documents at once—just hold down the Shift key as you click on the File menu, and the Save option becomes Save All.

In Excel there doesn't seem to be a similar shortcut. The closest native 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. (This, of course, won't work in Excel 2007 because it doesn't even have a File menu.)

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.xls 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 versions: 97 | 2000 | 2002 | 2003 | 2007

Save Time! ExcelTips has been published weekly since late 1998. Past issues of ExcelTips are available in convenient ExcelTips archives. Have your own enhanced archive of ExcelTips at your fingertips, available to use at any time!
 
Check out ExcelTips Archives today!