I have an app where a lengthy procedure is being run in a module while the results are being written to a form with a cancel button. When the user clicks cancel, I want to stop executing the sub in the module.

Is there any way to unconditionally break the execution of a procedure from another form?

Essentially, I want to inject an "exit sub" unconditionally at whatever point the sub is at.

Any help would be appreciated.

John