BeforeClose Event does not run
Posted by Keith Hoar on February 09, 2000 12:26 PM
I have tried all combinations of the BeforeClose event: WorkBook_BeforeClose, App_WorkBook_BeforeClose, WorkBookBeforeClose, and BeforeClose. Nothing works.
Copied sample directly from MSDN. Set break point in WorkBook_BeforeClose sub but the debugger never stops after after "File -- Close" is clicked.
Three other users tried Workbook_BeforeClose in new workbooks on their PCs. they did not run either.
This is just too simple. What am I doing wrong.
Sample: (Does not run)
Sub WorkBook_BeforeClose(Cancel As Boolean)
Dim x As String
x = "XXX"
Cancel = True