'Continue' must be followed by 'Do', 'For' or 'While'

A Continue statement must be followed by Do, For, or While, depending on if the Continue statement appears within a Do...Loop loop, For...Next loop, or While...End While loop.

Error ID: BC30781

To correct this error

  1. If the Continue statement is in a Do...Loop loop, change the statement to Continue Do.

  2. If the Continue statement is in a For...Next loop, change the statement to Continue For.

  3. If the Continue statement is in a While...End While loop, change the statement to Continue While.

  4. Otherwise, remove the Continue statement.

See Also

Reference

Continue Statement (Visual Basic)