The WithEvents keyword indicates that a declared object variable refers to a class instance that can raise events.
The WithEvents keyword is used in this context:
Dim Statement
Visual Basic Language Keywords