Passing a UDF as an argument to a UDF
No, pass a key which is evaluated
Sub S1( idx)
Select Case idx
Case 1 : Call S2
Case 2: Call S3
etc.
End Select
End Sub
Sub S2()
End Sub
Call S1(num)
--
HTH
Bob Phillips
(remove nothere from email address if mailing direct)
"puff" wrote in message
ups.com...
I'm a bit new to excel VBA and wondered if it is possible to pass a UDF
reference as an argument to a UDF as in:
Sub S1( subReference )
subRefrence()
End Sub
Sub S2()
End Sub
Call S1(S2)
If it can not be done cleanly, is there a workaround such as passing
the name of the function as an argument and then somehow evaluating it
inside the UDF?
Thanks for any clues.
|