Return more than one value in LS function?

I’m sure this is a simple answered question. I am trying to figure out how to return more than one value in a function.

I am returning one value in this code:

Function RemoveCommas(strDisc As String)

For x=1 To Len(strDisc)

	If Mid(strDisc,x,1)="," Then

		Mid(strDisc,x,1)="-"

	End If

Next

RemoveCommas=strDisc

End Function

I pass a string to the function through strDisc and return the value through RemoveCommas=strDisc. How can I set another value in the function and return in? In Javascript I can do it with return(x,y) – how do I do it in LS?

Thank you for any help!

Subject: *Pass the parameter by reference and set the value of the parameter directly.

Subject: Return more than one value in LS function?

Sure – type the function as a Variant and return an array.

Subject: RE: Return more than one value in LS function?

Thankyou Stan. It worked perfectly. The solution was not one that I would have thought – I tried typing the function as an Array. Now I know.