Table of contents
TOC
Collapse the table of content
Expand the table of content

Event handler is invalid

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

The parameter list of an event-handlingprocedure must precisely match the declaration of the event. This error has the following cause and solution:

  • Your event-handling procedure has the wrong number of parameters. Eliminate extra parameters or add the missing ones.

  • One or more of your event-handling procedure parameters has the wrong data type.

    Make the parameter types match those of the event declaration.

  • Your event-handling procedure is a Function rather than a Sub. Make your procedure a Sub. An event handler can't return a value.

  • Another type library uses the event name for a type of its own.

    Qualify the name with the name of the proper type library to avoid the ambiguity.

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

© 2018 Microsoft