Custom Search

Monday, September 20, 2010

How do you return two values from a function

result=example(2,3)
function example(a,b)
      dim myarray(2)
      myarray(0) = a+b
      myarray(1)=a*b
      example=myarray
end function
msgbox result(0)
msgbox result(1)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.