PDA

View Full Version : Exit in VB 7.7


AndyChamp
10-08-2012, 09:40 AM
I have a script that contains a subroutine. I call the subroutine from inside a loop; in the subroutine I have an Exit step to abort the subroutine on a condition. I've found that it returns to the main part of the script at the step following the subroutine call - and this is true even if the call was inside a loop, so if the step was last in the loop it aborts the loop. Is this to be expected?

I notice that there is a change to Exit in VB8, but I don't think our site licence covers that.

kinook
10-08-2012, 10:50 AM
Add a step (i.e., Group or Log Message) after the Subroutine Call step at the same indent level so that the build continues within the loop.