Hi folks, hoping someone can help me with this.
I have a workbook with a _BeforeClose event which fires twice, but only when the Excel application itself is closing. When the event fires the second time, the workbook is already "gone" from Excel and the objects it is referencing do not exist, leading to a runtime error.
When I close the workbook WITHOUT closing Excel, everything functions as expected.
As you can see, the Workbook_Close event and the doShutDown() function below both make calls to routines in other code modules. I have not supplied these here as there are a few. I have however tried removing these calls, but doing so does not fix the 'double-firing' behaviour so I think these can be safely eliminated from suspicion.
Bookmarks