'For' must end with a matching 'Next'

A For statement occurs without a corresponding Next statement. A Next statement must be used to end the For loop.

Error ID: BC30084

To correct this error

  • If this For loop is part of a set of nested loops, make sure each loop is properly terminated.

  • Add a Next statement to the end of the For loop.

See Also

Reference

For...Next Statement (Visual Basic)