For Statement
Syntax
For Num = First To Last [Step Inc]
Next [Num]
Group
Description
Execute statements while Num is in the range First to Last.
Parameters |
Description |
This is the iteration variable. |
|
Set Num to this value initially. |
|
If this numeric value is greater than zero then the for loop continues as long as Num is less than or equal to Last. If this numeric value is less than zero then the for loop continues as long as Num is greater than or equal to Last. If this is omitted then one is used. |
See Also
Example
Sub Main
For I = 1 To 2000 Step 100
Debug.Print I; I+I; I*I
Next I
End Sub