Reputation: 63
I want to skip steps in a nested for loops of like 9 loops but the code will express my question and predicament:
Sub question()
For x = 0 To 10
For y = 0 To 10
If x = 5 And y = 7 Then
'skip to x = 8
End If
Next
Next
End Sub
Upvotes: 0
Views: 147
Reputation: 1904
Just set x = 8
Sub Question()
Dim x As Integer
Dim y As Integer
For x = 0 To 10
For y = 0 To 10
If x = 5 And y = 7 Then
x = 8
End If
Next
Next
End Sub
Upvotes: 1