PDA

View Full Version : Solved: pb: if condition = true then go to next iteration



choubix
07-16-2008, 11:04 PM
hi there,
just a quick question: I am controlling a variable is not empty or equal to 0, if it is I would like to skip the value and go to the next iteration.

can someone tell me how to handle this please?
I tried resume, goto etcetc but these are for error handling only apparently

For i = 1 To 14
Control = aInputTrade(i, 5) 'control that we have a transaction for a given account
If Control = "" Or Control = 0 Then Next i 'doesnt work...

{code here}

Next i


got another question here if someone can help:
http://vbaexpress.com/forum/showthread.php?t=20922

thank you!

JimmyTheHand
07-16-2008, 11:34 PM
For i = 1 To 14
Control = aInputTrade(i, 5) 'control that we have a transaction for a given account
If Not (Control = "" Or Control = 0) Then
{code here}
End If

Next i

choubix
07-16-2008, 11:51 PM
completely forgot i could do it that way! thx :)