How to detect when a workbook is closing?

后端 未结 6 2367
后悔当初
后悔当初 2021-02-15 13:12

The Workbook.BeforeClose event triggers when the workbook is about to close but before the saving message prompt which allows cancelling it.

How can I detect when the wo

6条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-15 14:00

    I think deactivate is the best way to capture this. Beforeclose might occur earlier than Save event if the document was not saved. So Excel might prompt to save before closure. But Deactivate is the final event before closure (after save). So this can be used.

提交回复
热议问题