Missing For or mismatched For/Nextvariables.
Some possibilities:
A Next statement with no preceding For statement is encountered.
The variables for the For and Next statements do not match
The loop variable of the preceding For statement does not match the variable in the Next statement
Remedy:
Place a For statement before the Next statement or remove the Next statement. If you are using an editor than this may be due to out of order line numbers.
Correct the spelling of one of the two variables.
Make sure that the loop variable match for corresponding FOR/NEXT statements.