08-26-2009, 01:13 PM
you can use the same code in QTP, Only you need to replace return with func1
here is your QTP code
here is your QTP code
Code:
public function func1(var1)
var1="abc"
if (a=0) then
func1 = var1
else
msgbox "Bad luck"
end function