Note that when declaring a DLL function with a ParamArray argument, Microsoft Excel 95 allowed the user to omit parentheses next to the argument name. This bug has been fixed in Microsoft Excel 97. Applications with such improperly declared DLLs will generate the following error: "ParamArray must be declared as an array of variant." To correct the problem the developer must simply add the correct parentheses. Thus the following code will not work:
Declare Function RunVBA 16 Lib "XLRUN.DLL" Alias "RunVBA" (szMacro As String, ParmArray args as Variant) as Variant
And should be replaced by this code:
Declare Function RunVBA 16 Lib "XLRUN.DLL" Alias "RunVBA" (szMacro As String, ParmArray args() as Variant) as Variant