How to Cancel Specific (Nested) Macro but not Top Level Macro?

I have created macros to download bills and statements from their websites. Part of the routine for each is to call other macros that check if the date the bill/statement appears on the websites hasn't occurred yet, or if the bill/statement has already been downloaded.

I accomplish this by having at the start of each bill/statement macro an action that sets the variable Calling_Macro to %ExecutingInstance%. Inside the macros that check the date and/or if it is already downloaded I have an action to Cancel a Specific Macro of the instance: %Variable%Calling_Macro% if the date isn't current yet or the bill/statement has already been downloaded.

That works great if I run the macros for each bill or statement one at a time. However, I have also created a master macro that calls each of the bill/statement macros in turn. (i.e. each bill/statement macro is now a nested/child macro of the master macro). The very first one it came to wasn't ready to run yet and I saw it got cancelled. However, that also cancelled the master macro. That doesn't seem like it should have happened as the action is called Cancel a Specific Macro. I purposely did not run Cancel All Macros inside my sub-macros. I know I could work around this by setting variable in my sub-macros and then check them in each bill/statement macro, and then run Cancel Just This Macro from the particular bill/statement, but this is not elegant and seems contrary to the whole purpose of Cancel a Specific Macro.

So, the bottom line is: 1) Why is Cancel a Specific Macro also cancelling the parent/master macro and 2) Is there a way to cancel just that child macro from inside the 3rd macro? (the 3rd macro being the ones that check the date and if it was already downloaded).

Thank you,

You might need to creat loop and have “break from the loop” kinda of action.

Thanks for the reply, but that doesn't answer the question as to why Cancel a Specific macro (in my example invoking that in Macro #3 to cancel Macro #2) was also cancelling the topmost macro (Macro #1) also?

As I mentioned I could do, I did away with trying to use it and just set a variable I called (cleverly :-)) "Stop" to True and and then put a command to Cancel Just This macro right after it in Macro #3. Then back in Macro #2 after I execute Macro #3 I test if Stop = True to reset Stop to False and then the action to Cancel Just this Macro. It wasn't hard to due, but certainly wasn't as elegant as having Macro #3 stop Macro #2, and only Macro #2, if desired (which, after all, seems the entire raison d'être of having an action called Cancel Specific Macro).

See the Cancel a Specific Macro action on the Wiki.

“Cancel a Specific Macro (v9.0+) — Cancels a specific macro instance (from the %ExecutingInstance% or %ExecutingInstances% tokens).”

Look here for an explanation:

How Do We Use %ExecutingInstance% token? - #4 by kvanh