ListEvents Method Example

The following example retrieves the number and the corresponding list of events for the Oval object Oval1.

Private Sub Oval1_Click()

Dim strMsg As String

Dim pvEvents As Variant

Dim iNumEvents As Integer

strMsg = "This object has the following events: "

Oval1.ListEvents pvEvents, iNumEvents

For Each i In pvEvents

    strMsg = strMsg + i + ","

    Next

MsgBox strMsg, vbOKOnly, "Message"

End Sub