I am creating an Excel VBA addin that intercepts the worksheet 'SheetChange' events from a number of open data workbooks via a custom class declared WithEvents.
My custom addin is used in conjunction with a third party addin (which retrieves & transfers the value to a database via a custom formula) which also intercepts the same event and is therefore indispensable
Previously my addin has been working without an issue but now whilst the code in my addin works the third party addin (TPA) only works 50% of the time.
My event has very little code and has had no real change - in fact I have recently reduced the processing in an effort to avoid code interference.
It is my suspicion that the TPA is getting interrupted or not receiving the event that is raised when a worksheet change is made.
How can I force the order of event handling so that the third party addin handles first or is there someway to re-fire the event to ensure the TPA handles it ?
My understanding that in such a situation the order the events are called is random and cannot be predicted - can anyone confirm ?
Points to consider
The third party addin intercepts the event 100% of the time when it is the only addin. It also works 100% of the time if I comment out my entire event listener sub.
I have tried putting a DoEvents at the top of my code but this doesn't always appear to work.
Being a third party addin it is password protected and I can't look at the code.
I can not post either addin for review - so this is a theoretical exercise and I am looking for other exports approaches / views.