VB.Net force Next in a For Loop

Hello,

Is there a way to force a the for loop to skip the iteration it is on and go to the next one? I know there is one in Java, but I can't think if what it may be in VB.

ex.

For i = 0 to count

Try
'some code that may cause an error
Catch ex as exception

'the call to jump to the next iteration of the for loop
End Try

Next

Thanks
GeznaAsked:
Who is Participating?
 
RonaldBiemansConnect With a Mentor Commented:
Your code is ok it will just go to the next iteration
0
 
rajupsCommented:
instead of using try catch try using on error goto XXX

in the XXX do whcih ever stuff u want to do,nd if u r more specific about the exception use err.getException().raise to raise the exception and finally say resume next

0
All Courses

From novice to tech pro — start learning today.