Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Looping wont stop
#1
Solved: 10 Years, 9 Months, 1 Week ago
Hi,
I have 3 values in a datasheet, with my code the datasheet keeps going on after the 3rd iteration which makes it fail.
Can anyone please help as the code actually works for other sections of the script.
My code is -

Code:
rc =datatable.getrowcount
for i =1 to rc
datatable.setcurrentrow i

------

Next

Can anyone tell me what is going on please.and i have set the File settings to 'run one iteration'

Thanks
Reply
#2
Solved: 10 Years, 9 Months, 1 Week ago
What does msgbox rc display ?
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply
#3
Solved: 10 Years, 9 Months, 1 Week ago
It was howing 5. i have now creted a new datasheet all is fine now. thanks for the idea of checking using msg box
Reply
#4
Solved: 10 Years, 9 Months, 1 Week ago
So your 2 rows were merely created from the 'virtual row" flag being set by QTP reading a imported excel. During these situations you must select the last 2 rows after the end of data and simply right click and then click on Delete. sometimes this helps, else just create a new sheet as you did.

In either case, You are most welcome :-)
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  how to use looping statement dmvelic083185 1 1,165 09-26-2017, 08:46 PM
Last Post: Ankur
  Perform some functions whenever QTP Stop button is pressed smartkarthi 2 2,941 08-22-2013, 11:43 AM
Last Post: smartkarthi
  Button wont enable mv8167 9 9,553 12-11-2012, 03:00 PM
Last Post: Ankesh
  How to stop Second Action Call faheem05 6 3,914 10-05-2012, 11:11 AM
Last Post: faheem05
  Excel_Datasheet Looping problem Saadat Chowdhury 0 1,667 10-05-2012, 08:42 AM
Last Post: Saadat Chowdhury

Forum Jump:


Users browsing this thread: 1 Guest(s)