GTO
10-06-2009, 03:53 AM
Greetings:
 
Due to a problem running an add-in, I would like to disprove a general bug, as I suspect my 'poor ol' laptop' is just too close to toasted...
 
In short - an add-in correctly calls/runs code called from Workbook_Open upon running Excel.
 
It does not however, call/run code from Workbook_BeforeClose upon exiting the app.
 
It does call/run Workbook_BeforeClose upon un-installing (Tools|Add-Ins|un-tick) the add-in.
 
I have searched and see find no documentation as to this behaviour - thus suspect my computer/app problems/missing patch/whatever...
 
If anyone w/2000 could do this simple test (or simply state from knowledge), I would appreciate it.
 
In Excel 2000, install an add-in with nothing but:
Option Explicit
    
Private Sub Workbook_BeforeClose(Cancel As Boolean)
MsgBox "Closing"
End Sub
    
Private Sub Workbook_Open()
MsgBox "Opening"
End Sub
 
Open and close the app a couple of times. Presuming you get the msgbox when exiting, my belief is confirmed.
 
Thank you in advance,
 
Mark
Due to a problem running an add-in, I would like to disprove a general bug, as I suspect my 'poor ol' laptop' is just too close to toasted...
In short - an add-in correctly calls/runs code called from Workbook_Open upon running Excel.
It does not however, call/run code from Workbook_BeforeClose upon exiting the app.
It does call/run Workbook_BeforeClose upon un-installing (Tools|Add-Ins|un-tick) the add-in.
I have searched and see find no documentation as to this behaviour - thus suspect my computer/app problems/missing patch/whatever...
If anyone w/2000 could do this simple test (or simply state from knowledge), I would appreciate it.
In Excel 2000, install an add-in with nothing but:
Option Explicit
Private Sub Workbook_BeforeClose(Cancel As Boolean)
MsgBox "Closing"
End Sub
Private Sub Workbook_Open()
MsgBox "Opening"
End Sub
Open and close the app a couple of times. Presuming you get the msgbox when exiting, my belief is confirmed.
Thank you in advance,
Mark