Event handler must be a FUNCTION

The event handler for an object is a function and the user-defined procedure is a sub.