Variable argument list with Visual Basic? [duplicate]
In VBA, functions can hand over an undefined number of arguments, so there should be no problem.
Directly in VBA, you'd define a function like this:
Function SumAll(ParamArray var() As Variant) As Double Dim i As Integer Dim tmp As Double For i = LBound(var) To UBound(var) If IsNumeric(var(i)) Then tmp = tmp + var(i) Next SumAll = tmpEnd Function