Syntax
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Enter
Code
End Sub
This event will run before a workbook closes.
Required Parameters
Cancel
The cancel parameter is original set to False
when the event begins. If the cancel parameter is set to value of True then the
workbook will not close.