andreacosta
New Member
- Joined
- Sep 23, 2009
- Messages
- 2
I just started fooling around w/ VBA yeseterday, so I'm still getting my bearings.
I know how to create functions in which the arguments are explicitly stated i.e.
But how would I modify the function to include any number of arguments? i.e.
I've seen ParamArray being applied in certain instances where the number of arguments can vary....not sure if that can be used in this case.
Any assistance is much appreciated.
I know how to create functions in which the arguments are explicitly stated i.e.
Code:
Function LINK3(num1, num2, num3)
num1 = (1 + (num1 / 100))
num2 = (1 + (num2 / 100))
num3 = (1 + (num3 / 100))
LINK3 = (WorksheetFunction.Product(num1, num2, num3) - 1) * 100
End Function
Code:
Function LINK3(num1, num2, num3)
num1 = (1 + (num1 / 100))
num2 = (1 + (num2 / 100))
num3 = (1 + (num3 / 100))
...
numx = (1 + (numx/100))
LINK3 = (WorksheetFunction.Product(num1, num2, num3..., numx) - 1) * 100
End Function
Any assistance is much appreciated.