Micro Focus QTP (UFT) Forums
Invalid procedure call or argument when using 2 excel sheet - 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: Invalid procedure call or argument when using 2 excel sheet (/Thread-Invalid-procedure-call-or-argument-when-using-2-excel-sheet)



Invalid procedure call or argument when using 2 excel sheet - Uma - 10-08-2011

Hi,
I am using 2 excel sheet.My script is perfectly fine with the first excel.
It is opening 2nd excel file and excuting all the rows and it is going again to the for loop and it is giving
"Invalid Procedure call or argument error"

In my case
Code:
if i-b1
Set xlWrkbk = xlApp.Workbooks.Open("C:\zip1.xls")
else if
Set xlWrkbk = xlApp.Workbooks.Open("C:\zip1.xls")
end if
I am using the same object and sheets for both excel.Is it ok?

Any help?
Thank You
Uma


RE: Invalid procedure call or argument when using 2 excel sheet - Uma - 10-11-2011

Remove the sheet and work it again with new sheet,Solved
Uma
Solved
delete the old page and add the new page
Uma