Error : Class not defined
I am facing strange error in QTP. I have written classes for Excel and XML and when i trying to create an object instance for that class in another class which is present in the main driver it throws the error message as "Class is not defined".
Able to create object instance situations
1. Able to create an object instance and able to access the class methods when the whole target class (Excel, XML) in present in the Main driver. Now if i create an object instance it is.
2. Load the file using Execute File Statement before creating object instance. This way also worked.
Not able to create object instance situations.
1. Associate the vbs files in to Resources tab and execute. Here it throws the "Class is not defined error" message.
Any suggestions would be really appreciated
Re: Error : Class not defined
'External VBS File
Public Function f1()
'TODO: Function Body
'Write this function in the external .vbs/qfl
Public Function CreateMyClass()
Set CreateMyClass = New MyClass
'In QTP Driver write the following code objMyClass=CreateMyClass