Hi
I wish to use the above event and this is the first time I have tried it, however I cannot get it to work no matter what I do. I am sure I am doing something really basic wrong but cannot work it out.
To try it out I cut and pasted the example from VBA help
Private Sub App_WorkbookBeforeClose(ByVal Wb as Workbook, _
Cancel as Boolean)
a = MsgBox("Do you really want to close the workbook?", _
vbYesNo)
If a = vbNo Then Cancel = True
End Sub
No result when closing, I tried it in 2000, XP and 2007, same result.
I also tried the following
Private Sub Workbook_BeforeClose(Cancel as Boolean)
a = MsgBox("Do you really want to close the workbook?", _
vbYesNo)
If a = vbNo Then Cancel = True
End Sub
Any guidance would be appreciated
Regards
Jeff
Bookmarks