Notes on Reference Citations - Version 2.70, by Dr. Herong Yang
Passing Array in Function
'Passing Arrays as Arguments' tutorial was cited in a StackOverflow forum post in 2011.
The Passing Arrays as Arguments tutorial was cited in a StackOverflow forum post in 2011.
Subject: Passing Array in Function Date: Sep 30, 2011 Author: Chris Santiago Source: http://stackoverflow.com/questions/7614476/passing-array-in-function > I have an array that is read like this > > MyArray(0)='test' > MyArray(1)='test2' > MyArray(2)='test3' > > How do I pass this through a function? > > Function(MyArray(all_arrays)) > > What do i put for 'all_arrays'? Looks like you need to define you function as such: Function <FunctionName>(byref <list Name>) then when you call it in your code use <FunctionName>(MyArray) found here: http://www.herongyang.com/VBScript /Function-Procedure-Pass-Array-as-Argument.html passing by referrence using just the array name allows you to pass in the entire array to the function
Table of Contents