ParamArray ArgList()中可变数量的参数
如果我想通过数组为ParamArray arglist传递多个值,该怎么办?到目前为止,从VBA上看,似乎需要明确列出要传递的值.但是,如果要传递的值的数量可能不同,那么我不知道要传递多少个值该怎么办?有没有办法使用尺寸可变的数组(一维数组)?
If I want to pass a number of values for the ParamArray arglist via an array, how do I do it? From what I've read so far, on VBA, it appears that I need to explicitly list the values that I want to pass. But what if there are potentially different numbers of values to pass, so I do not know in advance how many I'll want to pass to the function? Is there not some way of using an array (a one-dimensional array) with a variable dimension?
如果函数包含参数数组,则可以将可变数量的值传递给函数:
You can pass a variable number of values to a function if the function includes a Param Array:
http://msdn.microsoft.com/en-us/library/538f81ec(v = VS.71).aspx
http://msdn.microsoft.com/en-us/library/aa164809(v = office.10).aspx