Canceling a macro on error
Forums
I stack all my macros together and use a "master" macro to run them sequentially. It allows me to simplify and compartmentalize the code. The problem is if I get an error. The code continues to run from the master program. Any suggestions on how to stop it? Below is a snippet of the macro that runs the other macros.
Thanks,
Randy
ProjectLocation = Client.WorkingDirectory()
------ If there is an error in the import Macro all the other macros will run
Client.RunIDEAScript ProjectLocation & "Macros.ILB\001 Import Files.iss"
Client.RunIDEAScript ProjectLocation & "Macros.ILB\002A General Ledger-Cash.iss"
Client.RunIDEAScript ProjectLocation & "Macros.ILB\002B General Ledger - ACSGFI.iss"
Client.RunIDEAScript ProjectLocation & "Macros.ILB\002C General Ledger-Credit.iss"
Client.RunIDEAScript ProjectLocation & "Macros.ILB\003A Monthly ACS Totals.iss"
Hi Randy,Instead of using…
Hi Randy,
Instead of using the Client.RunIDEAScript use Client.RunIDEAScriptRV, this allows you to return a variable. If you encounter an error in the called file then you return a flag saying there was an error and check the variable before calling the next iss file.