Share via


'Exit Do' can only appear inside a 'Do' statement

An Exit Do statement occurs outside of a Do loop. Exit Do is valid only between a Do statement and a corresponding Loop statement.

Error ID: BC30089

To correct this error

  1. Make sure a valid Do statement precedes the Exit Do and a valid Loop statement appears after it.

  2. Verify that other control structures within the Do loop are correctly terminated.

See Also

Reference

Do...Loop Statement (Visual Basic)