Visual Basic Language Reference  

On

The On keyword either introduces a response to a run-time error or turns a compiler option on.

The On keyword is used in these contexts:

On Error Statement

Option Explicit Statement

Option Strict Statement

See Also

Visual Basic Language Keywords