For...Next Statement

 

For  counter = expression1 to expression2 [Step increment]

            [statements]

Next [counter]

 

Repeats the execution of a block of statements for a specified number of times.

Example: 

 

Sub main ()

 

Dim x,y,z

  

   For x = 1 to 5

       For y = 1 to 5

          For z = 1 to 5

          Print "Looping" ,z,y,x

          Next z

       Next y

   Next x

End Sub