Delen via


'Next' control variable does not match 'For' loop control variable

The control variable in the Next statement of a For...Next loop must match the variable in the corresponding For statement.

Error ID: BC30976

To correct this error

  • Check the spelling of the variable in the Next statement and in the corresponding For statement to make sure it matches.

  • Ensure that no parts of the enclosing loop have been unintentionally deleted.

  • If this loop is part of a set of nested loops, ensure that every loop is correctly terminated.

See Also

Reference

For...Next Statement (Visual Basic)