E
Eric Fingerhut
Sorry if this is an obvious one. I want to have code to protect myself from
closing a project without saving changes. The code below just doesn't execute
the save although the logic hits the line.
TIA, Eric
in Thisworkbook
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Cancel = Not Shutdown(ThisWorkbook)
If Cancel Then
Call ThisWorkbook.Save
Debug.Assert ThisWorkbook.Saved
Cancel = False
End If
End Sub
closing a project without saving changes. The code below just doesn't execute
the save although the logic hits the line.
TIA, Eric
in Thisworkbook
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Cancel = Not Shutdown(ThisWorkbook)
If Cancel Then
Call ThisWorkbook.Save
Debug.Assert ThisWorkbook.Saved
Cancel = False
End If
End Sub