====== For...Next ======
For = To [Step ]
...
Next
A simple loop with predefined conditions.
**Parameters**
|< 100% 15% >|
|var|Variable used for counting.|
|start|The initial value of the variable.|
|stop|The final value of the variable.|
|stepval|//Optional.// The step by which the value of the variable changes. May be negative. The default step is 1.|
**Example**
For var = 1 To 4
MsgBox(var) # --> 1 --> 2 --> 3 --> 4
Next
For var = 5 To 2 Step -1
MsgBox(var) # --> 5 --> 4 --> 3 --> 2
Next
**Related**
[[loop_whilewend]], [[loop_break]], [[loop_continue]]