01-04-2014, 03:30 AM
Hello,
I have a code in qtp as below:
I saved the function in the function library.
When I run qtp, I get error "object required:sheetone". Do I need to have sort of return in the function?
Please advise.
-S
I have a code in qtp as below:
PHP Code:
Dim FilePath
FilePath = "Template.xlsx"
Set ExcFile = ExcelApp.Workbooks.Open (FilePath)
Set SheetOne = ExcFile.Worksheets("HappyPath")
closeVB ''call the function
I saved the function in the function library.
PHP Code:
Function closeVB
If VbWindow("vbname:=frmPrint").Exist Then
SheetOne.Cells(i+1,25) = "Yes"
Else
SheetOne.Cells(i+1,25) = "No"
End if
End Function
When I run qtp, I get error "object required:sheetone". Do I need to have sort of return in the function?
Please advise.
-S