Link to home
Start Free TrialLog in
Avatar of Gezna
Gezna

asked on

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
ASKER CERTIFIED SOLUTION
Avatar of RonaldBiemans
RonaldBiemans

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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