Forum Discussion

Pakema's avatar
Pakema
Contributor
14 years ago

[VBScript, TC 7.52] How to go to next iteration in loop "For...Next"

People, Help



Code



Sub LoopExample

Dim I



For I = 0 To 10

IF I = 3 Then Continue 

Next

End Sub ' LoopExample



In line "IF I = 3 Then Continue " I have Error 



Question: What I must write instead of it?



VBScript, TC 7.52



Thanks

1 Reply

  • I have just resolve problem



    Sub LoopExample

    Dim I, K



    For I = 0 To 10

    For K = 1 To 1

    IF I = 3 Then Exit For ' imitation of Continue 

    Next

    Next

    End Sub ' LoopExample