Article ID: 131333
Article Last Modified on 10/11/2006
Sub SaveAll()
' Store the Activeworkbook in a variable.
Set aw = ActiveWorkbook
For Each wb In Workbooks
If wb.Path <> "" Then ' Save file if it has been saved
' previously
wb.Save
Else ' If not previously saved, activate and show the
' Save As dialog box.
wb.Activate
Application.Dialogs(xlDialogSaveAs).Show
End If
Next
aw.Activate ' Activate the original Activeworkbook.
End Sub
After you create the macro, do the following to create a menu item and
assign the macro to it:
Menu Editor
76442 Macro to Save All Open Worksheets in Excel
Additional query words: 5.00a 5.00c 7.00a 97 98 XL5 XL7 XL97 XL98 menubar XL
Keywords: kbdtacode kbhowto kbprogramming KB131333