Close ALL excel windows


Posted by Dustin on December 17, 2001 2:45 PM

I am trying to make a macro that will close and save all of the workbooks that i have open at that time, whether it be 2 or 10. Thanks for the help.



Posted by Jacob on December 17, 2001 5:29 PM

Hi

This will do the trick

Sub CloseIt()
Application.screenupdating = false
application.displayalerts = false
on error goto z:
a:
ActiveWorkbook.Save
ActiveWindow.Close
goto a:
z:
End Sub

Hope this helps