AddEventHandler Method Example

The following example adds the event handler "OpenPicture" to the Click for the object CurrentObject.

Dim lIndex As Long

CurrentObject.Procedures.AddEventHandler "Click", "OpenPicture", lIndex

The resulting procedure is as follows:

private sub CurrentObject_Click()
OpenPicture
end sub