MrExcel Publishing
Your One Stop for Excel Tips & Solutions

3 Lowest Values Function Help Needed


Posted by Steve Bell on November 05, 2001 5:20 AM

I'm writing a function to return an array of the 3 lowest values passed to it. I wanted to pass an array as an argument to it. I can't seem to figure out how to pass arrays as arguments to a VBA function. Any ideas?


Posted by Mark O'Brien on November 05, 2001 6:15 AM

You need to pass arrays to functions, subs etc using "ByRef".
e.g.

Public Sub GetArray(ByRef Myarray() As String)