Solved

VB.Net force Next in a For Loop

Posted on 2004-04-19
2
1,747 Views
Last Modified: 2008-01-09
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
0
Comment
Question by:Gezna
2 Comments
 
LVL 25

Accepted Solution

by:
RonaldBiemans earned 500 total points
Comment Utility
Your code is ok it will just go to the next iteration
0
 
LVL 5

Expert Comment

by:rajups
Comment Utility
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

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Normally the drop down box control found in the .Net framework tools is able to select just one data and value at a time, which is displayed on the text area.   But what if you want to have multiple values to be selected in the drop down box? As …
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now