For control variable already in use
When you nest For...Next loops, you must use different control variables in each one. This error has the following cause and solution:
- An inner For loop uses the same counter as an enclosing For loop.
Check nested loops for repetition. For example, if the outer loop uses
, the inner loops can't useFor Count = 1 To 25
as the control variables.Count
For additional information, select the item in question and press F1 (in Windows) or HELP (on the Macintosh).