'Handles' in modules must specify a 'WithEvents' variable qualified with a single identifier

To specify an event handler, Handles statements must specify an object variable that was declared with the WithEvents keyword.

Error ID: BC31418

To correct this error

  • Use the WithEvents modifier to declare variables that will be used with the Handles statement.

See Also

Reference

Handles

WithEvents

Other Resources

Events in Visual Basic