Closing Excel down with a macro?

  • Thread starter Thread starter andycharger
  • Start date Start date
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
 
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)
 
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
 

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

Back
Top