Retrieves the number of root objects into Items collection.
Type | Description | |||
Long | A long value that indicates the count of root items in the Items collection. |
A root item is an item that has no parent (ItemParent() = 0). Use the RootItem property of the Items object to enumerates the root items.
The following sample enumerates all root items:
Dim i As Long, n As Long With Group.Items n = .RootCount For i = 0 To n - 1 Debug.Print .CellCaption(.RootItem(i), 0) Next End With