DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

What is the DIAdem equivalent of "Continue For"?

Solved!
Go to solution

Hello,

I have a For loop, that allows me to process multiple group from different files at once, that has a "If..Then" check at the beginning of the loop to make sure each individual group can actually be processed. If a group fails the check, I simply want to be able to skip to the next iteration of the For loop right there.

I know in VBA I would use "Continue For", how would I do this in DIAdem?

 

If x <> 0 Then
  x = ChV(x,"Group/Channel")
Else
  Call ErrorHandler("Can't find x.")
  Continue For
End If

  Thanks.

0 Kudos
Message 1 of 3
(4,100 Views)
Solution
Accepted by topic author Kevin_McG

There is no continue.

I would move the code to a sub and use exit sub.

 

dim i : For i=1 to 10
 DoWork i
Next

Sub DoWork(i)
    If 2 = i Then
      Exit Sub
    End If

    ' ...
end sub
0 Kudos
Message 2 of 3
(4,093 Views)

Ah, ok.

I can do that. Thanks.

0 Kudos
Message 3 of 3
(4,091 Views)