I am working on a complex spreadsheet based solution. Occasionally a user will experience a problem where the events in the sheet seem to no longer be caught by Excel.
I cannot replicate this behaviour at present, but I have visted the PC in question and I can confirm that despite putting a breakpoint on the following none of them are being called :
Worksheet_Activate()
Worksheet_Deactivate()
Worksheet_Change(ByVal Target As Range)
Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
This will of course be solved by the old classic 'have you tired turning it ( Excel ) on and off again' but I was wondering how this can happen, and how it may be prevented?
I even put Stop / MsgBox "blah" into the methods to see if it was just the breakpoint in VBE but I didn't get anything for that.
So, anyone know why excel is no londer raising the events?
Cheers.
FRD
Check your codes for:
If you turned it off, Excel wont turn it on again when your prodecure ends so be sure to set this parameter to TRUE at the end of your procedure.
If you set it to False at the begining of your procedure and you stop your procedure before it is set to True again, then it stays off.
If your code crashes before reaching the
Application.EnableEvents=True
line, then it will remain off also.