Visual Basic Scripting Edition  

For loop not initialized

The sequence of execution in your script jumped into the middle of a For�Next loop. This causes an error because For�Next loop counters must be initialized. The following demonstrates the correct structure of a For�Next loop.

For counter = start To end [Step step]
    [Exit For]

To correct this error

See Also

Looping Through Code | For...Next Statement | Do...Loop Statement | Exit Statement | For Each...Next Statement | While...Wend Statement