This statement repeats a group of statements a specified number of times.
For counter = start To end [Step step]
[statements]
[Exit For]
[statements]
Next [counter]
The step parameter can be either positive or negative. The following table shows how the value of the step parameter determines loop processing.
Value |
Loop executes if |
Positive or 0 | counter <= end |
Negative | counter >= end |