![]() |
Closing Excel down with a macro?
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 -- Message posted from http://www.ExcelForum.com |
Closing Excel down with a macro?
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) "andycharger " wrote in message ... Hi, I am using ActiveWorkbook.Close to close my spreadsheets but I would also like to terminate Excel too. I have tried Application.Quit but this did nothing and Excel was still open. Does anyone know of a way to close Excel from a macro and can they provide and example? Thanks --- Message posted from http://www.ExcelForum.com/ |
Closing Excel down with a macro?
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 -- Don Guillett SalesAid Software "andycharger " wrote in message ... Hi, I am using ActiveWorkbook.Close to close my spreadsheets but I would also like to terminate Excel too. I have tried Application.Quit but this did nothing and Excel was still open. Does anyone know of a way to close Excel from a macro and can they provide and example? Thanks --- Message posted from http://www.ExcelForum.com/ |
All times are GMT +1. The time now is 09:06 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com