Invalid ParamArray use

This page is specific to the Visual Basic for Applications (VBA) Language Reference for Office 2010.

The parameter defined as ParamArray is used incorrectly in the procedure. This error has the following causes and solutions:

  • You attempted to pass ParamArray as an argument to another procedure that expects an array or a ByRef Variant.

    Assign the ParamArray parameter to a Variant, and then pass the variant.

  • You attempted to use an Erase or ReDim statement with a ParamArray parameter within its procedure. Remove the Erase or ReDim. These operations can't be performed on the ParamArray parameter.

For additional information, select the item in question and press F1 (in Windows) or HELP (on the Macintosh).