Occurs before the workbook closes. If the workbook has been changed, this event occurs before the user is asked to save changes.
Syntax
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Cancel False when the event occurs. If the event procedure sets this argument to True, the close operation stops and the workbook is left open.