property Items.SelectCount as Long

Counts the number of items that are selected into control.

TypeDescription
Long A long expression that identifies the number of selected items.

Each group supports multiple items selection. Use SingleSel property of the Group object to allow multiple selection. The SelectCount property counts the selected items in the group. If the control's SingleSel is False, the following statement retrieves the handle for the selected item: Group.Items.SelectedItem(). If the control supports multiple selection the following sample enumeratee all selected items:

Private Sub selItems(ByVal g As EXPLORERTREELibCtl.Group)
    Dim h As HITEM
    Dim i As Long, j As Long, nCols As Long, nSels As Long
    With g
        nCols = .Columns.Count
        With .Items
            nSels = .SelectCount
            For i = 0 To nSels - 1
                Dim s As String
                For j = 0 To nCols - 1
                    s = s + .CellCaption(.SelectedItem(i), j) + Chr(9)
                Next
                Debug.Print s
            Next
        End With
    End With
End Sub