The Add method of the OlapTreeNodes collection adds a new OlapTreeNode object to the collection.
Add(Caption As String, IconClosed As NodeIconIndexes, [IconOpen As NodeIconIndexes]) As OlapTreeNode
OlapTreeNode object
The Add method is used to populate the OlapTreeNodes collection with child nodes that are displayed in the tree. Call this method for each OlapTreeNode you want to add.
Private Enum NodeIcons
icoNode1 = 1
icoNode2
icoNode3
End Enum
Private Sub IOlapAddIn_ProvideChildNodes( _
ParentNode As DSSAddInsManager. OlapTreeNode, _
OlapTreeNodes As DSSAddInsManager.OlapTreeNodes)
On Error GoTo ProvideChildNodes_Err 'Handle errors
If ParentNode.Caption = "OLAP servers" Then
OlapTreeNodes.Add "Node 1", icoNode1
OlapTreeNodes.Add "Node 2", icoNode2
OlapTreeNodes.Add "Node 3", icoNode3
End If
Exit Sub
ProvideChildNodes_Err:
Debug.Print Err.Number, Err.Description, Err.Source
Debug.Assert False
MsgBox "ProvideChildNodes Failed"
Err.Clear
End Sub