'<procedure1>' and '<procedure2>' cannot overload each other because they differ only by parameters declared 'ByRef' or 'ByVal'

'<procedure1>' and '<procedure2>' cannot overload each other because they differ only by parameters declared ByRef or ByVal. Shadows assumed.

Two procedure declarations specify the same name and argument list, and the only difference is in the specification of ByRef or ByVal for one or more of the arguments. Overloaded versions of a procedure must differ from each other in the number, order, or data types of the arguments.

This message is a warning. Shadows is assumed by default. For information on hiding warnings or treating warnings as errors, see Configuring Warnings in Visual Basic.

Error ID: BC42003

To correct this error

  • If you intend to create a set of overloaded versions of a procedure, make the number, order, or data types of the arguments different in each version. Also, add the Overloads keyword to each declaration.

  • If you do not intend to overload a procedure, change the procedure name in one of the declarations.

See Also

Concepts

Procedure Overloading