"Continue" and Exit with For Loops
'This structure assumes that for each object, many work blocks can be
processed on each object.
Dim bSkip as Boolean ' logic if true, then skip rest of for loop.
For Each obj1 in objects
bSkip = False
[Work block1
bSkip = true or false]
if bSkip Then Goto ForEndA
[Work block2
bSkip = true or false]
if bSkip Then Goto ForEndA
[Work block3
bSkip = true or false]
....
ForEndA:
last steps every object need do before next object.
Next
-Stephen Rasey
|