Make a public variable, in a normal module and call it for example:
bWBOpened,
so: Public bWBOpened as Boolean
In the Workbook Open event, so in:
Private Sub Workbook_Open()
put this:
bWBOpened = True
Now test for this variable, so:
If bWBOpened = False Then
Reset_EnableEvents
End If
RBS
"Tim Childs" wrote in message
...
Hi
I am using the software from (the peerless) Chip Pearson's site that helps
with Application Event programming.
The event I have is as follows:
Private Sub App_WorkbookOpen(ByVal Wb As Excel.Workbook)
Etc etc
End Sub
Some time ago someone on the ng helped me by supplying this code to deal
with the situation when the VB Project has <fallen over e.g. if a
Run-Reset
has happened etc or a runtime error has been finished by the user pressing
"End" on the dialog box.
Sub Reset_EnableEvents()
Set AppClass.App = Application
End Sub
Is there a property in VB that can identify if that reset has occurred
i.e.
can one determine programmatically if it is necessary to run the procedure
Reset_EnableEvents?
Thanks
Tim