Microsoft Office 2000/Visual Basic Programmer's Guide   

Passing an Array to a Procedure

You can declare an array in one procedure, and then pass the array to another procedure to be modified. The procedure that modifies the array doesn't necessarily need to return an array. Arrays are passed by reference, meaning that one procedure passes to the other a pointer to the array's location in memory. When the second procedure modifies the array, it modifies it at that same memory location. Therefore, when execution returns to the first procedure, the array variable refers to the modified array.

Note   For more information about passing values by reference, see "Tips for Defining Procedures in VBA" later in this chapter.