Consulting

Results 1 to 3 of 3

Thread: Solved: pb: if condition = true then go to next iteration

  1. #1

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

    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

    [vba]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[/vba]


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

    thank you!

  2. #2
    [vba]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[/vba]
    -------------------------------------------------
    The more details you give, the easier it is to understand your question. Don't save the effort, tell us twice rather than not at all. The amount of info you give strongly influences the quality of answer, and also how fast you get it.

  3. #3
    completely forgot i could do it that way! thx

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •