Is there a button to close multiple files simultaneously

L

Lothar

Is there a button in excel which I can use to close/save multiple files
(worksheets)simultaneously?
 
D

Don Guillett

I use this which usually behaves

Sub CLOSE_ALL()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
For Each w In Application.Workbooks
If w.Name <> ThisWorkbook.Name Then
w.Save
w.Close
End If
Next w
ThisWorkbook.Save
'line below leaves excel
Application.Quit
End Sub
 
R

RagDyer

Hold down <Shift> as you click on <File> in the Menu Bar.

Gives you a "Close All" option.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top