Kiran:

The following is simplistic but the idea should work.  It might be better to
put the while within a Do Loop.

In the local sheet, I defined a column as "value" and entered numbers 1
through 5.

numRows = DataTable.LocalSheet.GetRowCount

i = 1
While i < numRows + 1
  msgbox "row number = " & i
  denom = 3 - CInt(DataTable("value",dtLocalSheet))
  msgbox "i = " & i & ": denominator = " & denom
  If denom = 0 Then   ' my error message
     i = i + 1
  Else                       ' finish the program as all is well
     result = 15/denom
     msgbox "i = " & i & ": result = " & result
     i = i + 1
  End If
  DataTable.SetCurrentRow(i)
Wend


Hope this helps

On Mon, Sep 28, 2009 at 5:44 PM, Kiran Ogeti <[email protected]> wrote:

>
>  Hi all,
>
> I am running this situation which i beleive should not the be that
> complicated, but need help as I need to get it done asap...
>
> prob: my need is to stop the current iteration at the middle of the code
> and start the next one..
>
> I put a message box, so If i see something on application that I dont want
> see... I use msgbox to cancel that iteration and start a new one..
>
> but the prob is .. it always going to the next line rather *than going to
> the top*
>
> here is the code:
>
>   elseif ErrorOn = 5 then
>       Set qtTest = qtApp.Test
>   * qtTest.Settings.Run.startiteration = CurrentRow+1*
>    end if
>
> Could you help please..
>
> Thx
>
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to