Remarks

Exit Do, an alternate way to exit a Do...Loop structure, can be used only within Do...Loop structures. Any number of Exit Do statements can be placed anywhere within a Do...Loop structure.

Often used with the evaluation of a condition (for example, If...Then), Exit Do transfers control to the statement that immediately follows Loop.

When used within nested Do...Loop statements, Exit Do transfers control to the loop that is nested one level above the loop in which it occurs.