property OleEvent.ID as Long
Retrieves a long expression that specifies the identifier of the event.

TypeDescription
Long A Long expression that defines the identifier of the OLE event.
The ID property of the OLE Event is a read-only property that retrieves a long expression that specifies the identifier of the event. The identifier of the event could be used to identify a specified OLE event. Use the Name property of the OLE Event to get the name of the OLE Event. Use the ToString property to display information about an OLE event. The ToString property displays the idenfier of the event after the name of the event in two [] brackets.

For instance, when the TAB key is pressed, the ToString property returns "KeyDown[-602](KeyCode/Short* = 9,Shift/Short = 0)". This indicates that the identifier of the KeyDown event fired by the internal User editor is -602.

The following VB sample closes the editor and moves the focus to the next column when the user presses the TAB key while editing a cell:

Private Sub G2antt1_UserEditorOleEvent(ByVal Object As Object, ByVal Ev As EXG2ANTTLibCtl.IOleEvent, CloseEditor As Boolean, ByVal Item As EXG2ANTTLibCtl.HITEM, ByVal ColIndex As Long)
    If (Ev.ID = -602) Then  ' KeyDown
        Dim iKey As Long
        iKey = Ev(0).Value
        If iKey = vbKeyTab Then
            With G2antt1
                CloseEditor = True
                .FocusColumnIndex = .FocusColumnIndex + 1
                .SearchColumnIndex = .FocusColumnIndex
            End With
        End If
    End If