UPDATE: This is the WIP Function.
<%
Function ReturnTwoValues(Data)
If Data= Now() Then
Var1= \"ABC\"
Pass back an array:
Function ReturnTwoValues(Date_Field)
' Do some date testing using Date_Field and then return the proper values...
ReturnTwoValues = Array("hello", "world")
End Function
a = ReturnTwoValues(#7/7/2014#)
WScript.Echo a(0) ' ==> "hello"
WScript.Echo a(1) ' ==> "world"
Or take advantage of the fact that variables are passed by reference in VBScript:
Sub ModifyTwoValues(Date_Field, returnOne, returnTwo)
' Do some date testing using Date_Field and then return the proper values...
returnOne = "hello"
returnTwo = "world"
End Sub
ModifyTwoValues #7/7/2014#, var1, var2
WScript.Echo var1 ' ==> "hello"
WScript.Echo var2 ' ==> "world"
Easy workarounds:
Use an array, or
Use a dictionary object.
Here's an earlier StackOverflow question that has a full rundown: QTP: How can I return multiple Values from a Function