View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] baobob@my-deja.com is offline
external usenet poster
 
Posts: 100
Default Er...tell me again why I can't pass ParamArray to a Function?

Y'all set me straight a year ago on how to "pass" ParamArray to a
another Function (sorry about the Google; don't live in the real
world):

http://groups.google.com/group/micro...f9ce718998a088

Since then, this works:

Function Foo(ParamArray VParams()) As String
Dim V() As Variant
V = VParams
Foo = Bar(V)
End Function

Function Bar(VParams) As String
Dim VParam As Variant
For Each VParam In VParams
FlogSelfForInvestingIn(VParam)
Next
Bar = "Dow go bye-bye."
End Function

***

What I don't understand is why you must use an intermediate var. in
Foo. Why can't you do the more intuitive:

Function Foo(ParamArray VParams()) As String
Foo = Bar(VParams())
End Function

Function Bar(ParamArray VParams()) As String

etc.

Thanks much.

***