property OleEvent.Name as String

Retrieves the original name of the fired event.

TypeDescription
String A string expression that indicates the event's name.

Use the Name property to get the name of the event. Use the ID property to specify a specified even by its identifier. Use the ToString property to display information about fired event such us name, parameters, types and values. Using the ToString property you can quickly identifies the event that you should handle in your application. The following sample shows how to enumerate the arguments of an OLE event:

Private Sub ExplorerTree1_ItemOleEvent(ByVal Group As EXPLORERTREELibCtl.IGroup, ByVal Item As EXPLORERTREELibCtl.HITEM, ByVal Ev As EXPLORERTREELibCtl.IOleEvent)
    On Error Resume Next
    Debug.Print "Event name:" & Ev.Name
   If (Ev.CountParam = 0) Then
      Debug.Print "The event has no arguments."
   Else
      Debug.Print "The event has the following arguments:"
      Dim i As Long
      For i = 0 To Ev.CountParam - 1
         Debug.Print Ev(i).Name; " = " & Ev(i).Value
      Next
   End If
End Sub