'Handles' in classes must specify a 'WithEvents' variable, 'MyBase', 'MyClass' or 'Me' qualified with a single identifier

To specify an event handler, Handles statements must either specify an object variable declared with the WithEvents keyword, or a member qualified with the MyBase keyword.

Error ID: BC31412

To correct this error

  1. Use the WithEvents modifier to declare the variables to be used with the Handles statement.

  2. Specify the name of an event for the current class in the base class.

See Also

Reference

Handles

WithEvents

Other Resources

Events in Visual Basic