Forum Discussion
m... l.
Mar 22, 2017Copper Contributor
How to save all opened sheets in one time?
When many files opened, I have to click and wait for each file being completed. This takes a lot of time. Can it be clicked only once and all opened files can be saved?
- Hi
There's no direct way, other than right clicking on your Excel icon on your taskbar, choosing close all windows and then click save each time.
If you know a little about macros then you can save the following macro in your Personal Macro workbook and assign the macro to a button on your quick access toolbar:
The macro below will save all the open Excel files that are not new. If you have a new file (for example, Book1) open that hasn’t been saved, it will not be saved by this macro.
Sub SaveAll()
Dim wb As Workbook
Dim wbActWb As Workbook
Application.ScreenUpdating = False
Set wbActWb = ActiveWorkbook
If MsgBox("Are you sure you wish to save all?", vbYesNo, "Close and Save All?") = vbNo Then
Exit Sub
End If
For Each wb In Workbooks
If wb.Path <> "" Then wb.Save
Next wb
wbActWb.Activate
Application.ScreenUpdating = True
End Sub- m... l.Copper Contributor
Thank you very much.