How to give the For Loop for 3 work sheets? - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: How to give the For Loop for 3 work sheets? (/Thread-How-to-give-the-For-Loop-for-3-work-sheets) |
How to give the For Loop for 3 work sheets? - Uma - 09-10-2011 Hi, I am opening a excel sheet from QTP. This is my following code. Code: Set xlWrkbk = xlApp.Workbooks.Open("C:\New Folder\RETS.xls") For Code: intRow = intStartRow to xlWrksht.UsedRange.Rows.Count It checks all the 4 rows and it displays the correct result. If it work with the 2nd and 3rd sheet it doesnot work properly. It checks all the rows and again it tries to get inside and giving invalid procedure call or argument error. How to solve it?Any idea? Thanks, Uma RE: How to give the For Loop for 3 work sheets? - Uma - 09-10-2011 It is working,I gave 3 forloops based on its worksheet. Ie 3 forloops based on its worksheet gav |