Micro Focus QTP (UFT) Forums
How can i call a function which is written in a class? - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: How can i call a function which is written in a class? (/Thread-How-can-i-call-a-function-which-is-written-in-a-class)



How can i call a function which is written in a class? - 1981.madhu@gmail.com - 03-17-2010

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


RE: How can i call a function which is written in a class? - manishbhalshankar - 03-17-2010

Hi Madhu,
Inclued the vbs file in resources and use Add.functionname to access that function.


RE: How can i call a function which is written in a class? - jsknight1969 - 03-19-2010

Still have to intantiate the class.

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