Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA project does not close when workbook is closed | Excel Programming | |||
VBA project does not close when workbook is closed | Excel Programming | |||
close workbook without saving or promt to save | Excel Discussion (Misc queries) | |||
Close a workbook without saving macros | Excel Programming | |||
VBA project does not close when workbook is closed | Excel Programming |