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
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.