Hi,
Can someone please show me how I can pass an array as a parameter in a subroutine or function.
Thanks,
RF
Printable View
Hi,
Can someone please show me how I can pass an array as a parameter in a subroutine or function.
Thanks,
RF
Let's say you have a function that calculates an average, you would define the function like this...
Public Function Average(Array()) As Long
Be sure you put those parentheses where necessary. When you make a call to that function, you'll want to send it an array of numbers that are to be averaged. If that array is X() then a call to the function would go...
Text1.Text = Average(X)