ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Closing Excel within itself (https://www.excelbanter.com/excel-programming/322864-re-closing-excel-within-itself.html)

Jan Karel Pieterse

Closing Excel within itself
 
Hi Bruno,

Is it possible to close Excel (not just the workbook) from within a
Workbook_Open event?


Application.quit does the job.

You need to make sure all workbooks are saved or discarded first
though.

Workbooks("Book1.xls").Saved=True sets a workbook to saved state
(without saving).

Regards,

Jan Karel Pieterse
Excel MVP
www.jkp-ads.com



All times are GMT +1. The time now is 02:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com