restart for loop

  • Thread starter Thread starter Joe
  • Start date Start date
J

Joe

This is probably really simple... (I'm not a vb programmer)

I have a For loop I want to restart from within the loop.
For i = 0 To myarray.Length - 1
....
....
If something Then
myarray = a new array
i = 0
End If
Next
 
Joe,

About this are different ideas in this newsgroup, mine is that when you want
to do a loop depending on a loop, set it than in a loop where you test if
you have too stop or continue inside the loop by instance

dim check as boolean
do while check = false
for i as integer = 0 to 9
'do something
if a(i) = b then check = true
exit for
next
loop

Just as idea, I hope this helps?

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top