Micro Focus QTP (UFT) Forums

Full Version: How can i call a function which is written in a class?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
I have a one class ,in that having 2 functions .How can i call that 2 functions.
Ex.
Code:
Class Add()

function Max1()

end function

Function Min()

end function

end class

Regards
Madhu
Hi Madhu,
Inclued the vbs file in resources and use Add.functionname to access that function.
Still have to intantiate the class.

Code:
dim myclass:set myclass = new Ex.Class
myclass.Add