Visual Basic Language Reference  

WithEvents

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

See Also

Visual Basic Language Keywords