Error 431 - Numeric scalar variable expected

Numeric scalar variable expected - The counter variable in a FOR/NEXT counter variable is a BYREF parameter passed to the Sub/Function, a pointer target, a THREADED variable, an array variable (non-scalar), or the counter variable is not a numeric data type. Scalar variables are non-array variables.