Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unable to return value from a user-defined function to the calling Test
#2
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi Richa,

Use the below code, return is not the valid syntax

Code:
Public Function mysum(var1, var2)
' TODO: add function body here
Dim sum
sum=var1+var2
msgbox(var1 & "+" & var2 & "=" & sum)
mysum = sum
End Function


sum=mysum(1,2)
msgbox  "Sum=" &sum
Reply


Messages In This Thread
RE: Unable to return value from a user-defined function to the calling Test - by stephenlb4u - 06-03-2009, 02:59 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  UFT 12.02 Compatibility for IE 11.0 : Fail to identify the defined Object Amruta_121 9 11,168 01-11-2016, 12:45 PM
Last Post: vinod123
  Childobject return wrong checkbox count.. VpnQTP 1 2,847 04-09-2015, 09:07 PM
Last Post: babu123
  Calling a Function in Function Library when function is defined in an Action jitenderkkr 0 2,967 11-27-2014, 12:53 PM
Last Post: jitenderkkr
  calling QTP script from one to another krishnas.tester 3 6,726 11-12-2014, 10:32 AM
Last Post: vinod123
  calling stored procedure from Oracle borisk 3 6,446 03-19-2013, 12:41 PM
Last Post: gaveyom

Forum Jump:


Users browsing this thread: 1 Guest(s)