For ... Next

Top  Previous  Next

For...Next - Static Stepping Control Loop

 

Description:  For...Next loops are used to execute a set of instructions a specified number of times.

The basic syntax of the For...Next loop allows you to specify a start number, an end number and optionally the step interval (default is 1). The following syntax gives an example of both:

For i = 1 To 6

   SMEvent.Raise "Trace", "Count " & i

Next

 

or 

 

For i = 1 To 6 Step 2

   SMEvent.Raise "Trace", "Count " & i

Next