I am looking for a command that let's me jump on to the next iteration of the loop. Exit loop is not good cause this escapes from the entire loop altogether...
It's probably very easy, but I just lost it...
Printable View
I am looking for a command that let's me jump on to the next iteration of the loop. Exit loop is not good cause this escapes from the entire loop altogether...
It's probably very easy, but I just lost it...
the only way i know is to use the GoTo statement
VB Code:
For i = 1 To 10 If (i = 5) Then GoTo NextLoop End If Debug.Print i NextLoop: Next i
not very good practice to use GoTo's though
This would be ok
VB Code:
For i = 1 To 10 If (i = 5) Then i = i + 1 End If Debug.Print i Next i