property OleEvent.ToString as String
Retrieves information about the event.

TypeDescription
String A string expression that provides details about an OLE event. The ToString property formats the information as follows:

Name[ID] (Param/Type = Value, Param/Type = Value, ...)

For example, "KeyDown[-602](KeyCode/Short* = 9,Shift/Short = 0)" indicates that the KeyDown event was fired with the identifier -602, including two parameters:

  • KeyCode, a reference to a Short type with the value 9.
  • Shift, a Short type with the value
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. Use the ID property to specify a specified even by its identifier. Use the Name property to get the name of the event. Use the Param property to access a specified parameter using its index or its name.

For instance the following code:

Private Sub Pivot1_OleEvent(ByVal Ev As EXPIVOTLibCtl.IOleEvent)
    Debug.Print Ev.ToString
End Sub

generates an output such as:

Event[36863](EventID/Long = -607)
MouseUp[-607](Button/Short = 1,Shift/Short = 0,X/Long = 225,Y/Long = 152)
Event[36863](EventID/Long = -600)
Click[-600]()
Event[36863](EventID/Long = -602)
KeyDown[-602](KeyCode/Short* = 18,Shift/Short = 4)
Event[36863](EventID/Long = -602)