Visual Basic for Applications Reference
See Also Specifics
The number of arguments to a procedure must match the number of parameters in the procedure's definition. This error has the following causes and solutions:
- The number of arguments in the call to the procedure wasn't the same as the number of required arguments expected by the procedure.
Check the argument list in the call against the procedure declaration or definition.
- You specified an index for a control that isn't part of a control array.
The index specification is interpreted as an argument but neither an index nor an argument is expected, so the error occurs. Remove the index specification, or follow the procedure for creating a control array. Set the Index property to a nonzero value in the control's property sheet or property window at design time.
- You tried to assign a value to a read-only property, or you tried to assign a value to a property for which no Property Let procedure exists.
Assigning a value to a property is the same as passing the value as an argument to the object's Property Let procedure. Properly define the Property Let procedure; it must have one more argument than the corresponding Property Get procedure. If the property is meant to be read-only, you can't assign a value to it.
For additional information, select the item in question and press F1.