Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a nagging issue. I am trying to run a BeforeClose sub but it
just won't go. However, if I replace it with the Auto_Close sub then it works fine. The code is simple: private Sub Workbook_BeforeClose(Cancel As Boolean) MsgBox "close macro is working" end sub With the above code I do not see my message box when I close my workbook. It just closes. private sub auto_close () MsgBox "close macro is working" end sub With the above code I get my messagebox (and the useful bits of the code which I haven't pasted in here). I read something about the need for events to be enabled, so I ran a macro to enable events (Application.EnableEvents = True), but to no avail. It's not a big issue because the Auto_Close does what I need, but as a fickle follower of fashion I feel out of date. I've read that Auto_Close is soooooo last centuary ;-). What could I be doing wrong that stops the beforeclose working but lets auto_close do its job? regards Ben |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
question about Auto_Close and WorkbookBeforeClose | Excel Programming | |||
Question about auto_close | Excel Programming | |||
BeforeClose, Auto_Close, and ActiveX Server | Excel Programming | |||
Auto_Close() needs help | Excel Programming | |||
Auto_Close | Excel Programming |