I'd avoid "Global" as the keyword, as the variable is not global. It it was you wouldn't need it in the function declaration.

Howard's solution is a good one.

You can simplify the code in your function (at the cost of not actually having a handle on the original variable) by creating local copies and assigning them back before returning:

code:
Function MyUDF($ByRef_A,$ByRef_B,$ByRef_C)
Dim $rc,$A,$B,$C
$rc=Execute("$$A=$ByRef_A")
$rc=Execute("$$B=$ByRef_B")
$rc=Execute("$$C=$ByRef_C")

... Your Code ...

$rc=Execute("$ByRef_A=$$A")
$rc=Execute("$ByRef_B=$$B")
$rc=Execute("$ByRef_C=$$C")
Return
EndFunction

This however will not work quite as well with some of the more complex COM object types.