Deletes a sub-branch or a leaf from a branch.
Remove(NumObject As Long) As Boolean
Returns True on success.
NumObject
The following example builds on sample code for querying objects. For more information, click . Add the following code to the example after qry.Define.This example prints the starting number of items in the.sub-branch collection called andqrybr, searches the collection for the kDataCondition leaf, removes it, and checks that the number of items in the sub-branch reflects the removal.
For i = 0 To andqrybr.Count - 1
Debug.Print andqrybr.Count
If andqrybr.Item(i).Type = kDataCondition Then
andqrybr.Remove (i)
End If
Next i
Debug.Print andqrybr.Count