Micro Focus QTP (UFT) Forums

Full Version: How to access the excel userform using QTP
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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

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