All arguments in a call to a procedure defined with a ParamArray must be positional. This error has the following cause and solution:
The named-argument calling syntax can't be used to call a procedure that includes a ParamArray parameter. To supply only some elements of the ParamArray, use commas as placeholders for those elements you want to omit. For example, in the following call, if the ParamArray arguments begin after Arg2
, values are being passed only for the first, third, and sixth values in the ParamArray:
MySub Arg1, Arg2, 7,, 44,,,3
Note The ParamArray always represents the last items in the argument list.
For additional information, select the item in question and press F1 (in Windows) or HELP (on the Macintosh).