Terminating a Sub

  • Thread starter Thread starter Avi
  • Start date Start date
A

Avi

Hi,

I have some sub functions called inside the calling function. I want
to terminate macro if some exception occurs in the sub functions. If i
use exit sub, this only terminates the child function, execution
continues in the primary function.

One of the way to handle this i know is to handle the return value
from the child function and use exist sub in the parent function. But
I am looking for some generic approach that can terminate the Macro
execution from any of the child function. Can someone please suggest.

Thnx,
Av
 
yuo could try raising an error with your own error codes and trap those in
the calling procedure in an error handler
 
Back
Top