So it is easy.Try this Function and Sub to test:
Function OneLine(ByVal f As Variant, ParamArray V() As Variant) As Variant
Dim i As Long, ValToReturn As Variant
For i = 0 To UBound(V, 1)
V(i) = f
If IsNumeric(V(i)) Then ValToReturn = ValToReturn + V(I)
Next I
OneLine = ValToReturn
End Function
Sub TestOnLineFunction()
Dim X, a, b, c, d, e, f, g, h, i, j, k, TMP
Dim Y(1 To 7, 8 To 12)
x = 125
Y(5, 10) = "Anything you want"
Call OneLine(X, a, b, c, d, e)
MsgBox d ' will show 125
Call OneLine(Y, a, b, c, d, e, f, g, h, i, j, k)
MsgBox h(5, 10) ' will show string:"Anything you want"
'if You want to use Application.Run, do the same, but in this
'case will not take V variables ByRef because Run method is always taking ByVal
'So Sub do what is it doing but Function should return something in this case
X = 888
TMP = Application.Run("OneLine", X, a, b, c, d, e, f, g, h, i)
MsgBox TMP
End Sub
Function OneLine will set all passed after F variables value to be equal to F variable.
This F variable can be any value or even a multidimensional array. You can pass after F available as many variables as you want, but always as a Variant type. The V will always be passed ByRef. As You see OneLine function is can not return anything so you need Call it, and it will change all variables from this ParamArray V.
If you want to use Application.Run method do the same, but in that way function should return something because this Run method is always taking variables ByVal. So as you see it does not make sense to use Run method in this case. If you run Subroutine the behavior will be the same. Sub will do what is it doing and it will take as many variables as you pass but you should remember that Application.Run has a limit of 30 variables.