Exit For

This statement provides a way to exit the loop early.
It can only be used inside a For - Next or a For Each - Next loop.
This transfers control to the statement that immediately follows the Next statement.


For - Next

This loop will exit at the start of the third loop.


For - Each

This loop will exit after it finds the item "tw".


Nested Loops

This statement transfers control to the statement that immediately follows the Next statement.
If a loop is nested, the control is passed only one level up.


Important

You can use one or more Exit For statements inside the same loop.


© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited TopPrevNext