02-11-2013, 08:58 PM
Hi All,
I want to access the userform and Macros of excel using QTP.
I tried to find the object using QTP properties but It could not work for me.
Below are the code which I have tried:
I have added the below code in the excel and vbs script but getting the error that GetForm is not a valid property
I want to access the userform and Macros of excel using QTP.
I tried to find the object using QTP properties but It could not work for me.
Below are the code which I have tried:
I have added the below code in the excel and vbs script but getting the error that GetForm is not a valid property
Code:
Public Property Get GetForm() As Object
Set GetForm = New UserForm1
End Property
dim objExcel, wbkExcel, frm
set objExcel = Createobject("Excel.Application")
objexcel.visible = true
set wbkExcel = objExcel.workbooks.open("C:\formtest.xls")
set frm = wbkexcel.GetForm
frm.show