RE: On Error Goto Next Loop

Tech-Archive recommends: Fix windows errors by optimizing your registry



ofcourse it would be much better if you could do something like this

PSEUDO CODE :

for i=0 to 100


---- check if value is within the expected range
if not expectedrangecode then
continue for
end if
--- do the rest of youyr stuff
next

as this would give you a performance benefit ( try catch statements have a
lot of overhead ) so if you can validate the values yourself without try
catch then implement this validation

regards

Michel




"M. Posseth" wrote:


for i=0 to 100

try
'code that might cause an error
catch ex as exception
'this will skipp the curent and move to the next
continue for
end try

next

regards

Michel Posseth [MCP]



"Lucia" wrote:

Hi, everyone,

I have a for statement in my programm. I want to know if there is any
way to goto next i when some error occurs. I tried with the following
code. But it doesn't work...

for i=0 to 100

On Error Goto NEXTFOR

.....

NEXTFOR:
next

thanks a lot

Lucia


.



Relevant Pages