'Exit AddHandler', 'Exit RemoveHandler' and 'Exit RaiseEvent' are not valid
'Exit AddHandler', 'Exit RemoveHandler' and 'Exit RaiseEvent' are not valid. Use 'Return' to exit from event members.
The Exit statement cannot be used to exit AddHandler, RemoveHandler, or RaiseEvent methods in a Custom Event declaration. Instead, use the Return statement, without specifying a return expression, to exit the method.
Error ID: BC31111
To correct this error
Replace the Exit statement with a Return statement.
Make sure the Return statement does not specify a return expression.
See Also
Reference
Return Statement (Visual Basic)