Terminating a Sub

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
 
P

Patrick Molloy

yuo could try raising an error with your own error codes and trap those in
the calling procedure in an error handler
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top