Exit Do
This statement provides a way to exit the loop early.
It can only be used inside a Do - While, Do - Until or a Do - Loop.
This transfers control to the statement that immediately follows the Loop statement.
Do - While
This loops will exit at the start of the third loop.
Do - Until
This loop will exit at the end of the second loop.
Notice that the variable icount is incremented at the start of the loop.
Do - Loop
This loops through four times.
Nested Loops
This statement transfers control to the statement that immediately follows the Loop statement.
If a loop is nested, the control is passed only one level up.
Important
You can use one or more Exit Do statements inside the same loop.
© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited TopPrevNext