property ExplorerTree.Groups as Groups
Retrieves the control's groups collection.

TypeDescription
Groups A Groups object that indicates the control's groups collection.

Use the Groups property to access the control's groups collection. Use the Items property to access the items collection of the group. Use the Columns property to access the group's collection of columns. The Caption property specifies the group's caption, while the CellCaption property indicates the caption of a specified cell.

The following VBA sample enumerates all groups and items being shown on the control:

Dim e As EXPLORERTREELib.ExplorerTree
Set e = ExplorerTree1.Object
With e
    Dim g As EXPLORERTREELib.Group
    For Each g In .Groups
        Debug.Print "Enumerate Group " & g.Caption
        For Each i In g.Items
            With g.Items
                Debug.Print "Item " & .CellCaption(i, 0)
            End With
        Next
    Next
End With

The following VBA sample enumerates all groups and items being checked on the control:

Dim e As EXPLORERTREELib.ExplorerTree
Set e = ExplorerTree1.Object
With e
    Dim g As EXPLORERTREELib.Group
    For Each g In .Groups
        Debug.Print "Enumerate Group " & g.Caption
        For Each i In g.Items
            With g.Items
                If Not (.CellState(i, 0) = 0) Then
                    Debug.Print "Item " & .CellCaption(i, 0)
                End If
            End With
        Next
    Next
End With