Closing Excel down with a macro?

A

andycharger

Hi,

I am using ActiveWorkbook.Close to close my spreadsheets but I woul
also like to terminate Excel too.

I have tried Application.Quit but this did nothing and Excel was stil
open.

Does anyone know of a way to close Excel from a macro and can the
provide and example?

Thank
 
B

Bob Phillips

Try not closing the workbooks before using it.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
D

Don Guillett

this works for me to save all and close. Modify to suit.
Sub CLOSE_ALL()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
For Each w In Workbooks
w.Save
Next
Application.Quit
End Sub
 
Top