Hi all,
This "bubbling up" - does it work across Excel projects?
I ask because I can trap errors fine if the On Error statement is in the same project as the error, but the error goes un-handled (causing a fatal) if I called the procedure containing the error from outside of the project using Application.Run relying on an On Error statement in the calling project.
Basically, what I'd like to be able to do is test projects for errors by calling macros in projects B, C...Z one at a time from project A. If they have errors but there's error handling code in projects B, C etc. to trap the errors, then they pass the test, and my project A won't crash. I then log the passes somewhere else.
But, if there are errors in projects B, C etc. that go un-handled then I want project A to handle this at the first error, as project A is at the top of the call stack. Project A would then log the fail for any project that didn't handle its own errors.
This all works so far except for the fact that project A's On Error statement misses the errors in project B, C, etc. It would be a pain to have to import the modules from each project into project A to make them more "local", which I'm sure is not the answer.
Thanks a lot!