Add

The Add method of the OlapTreeNodes collection adds a new OlapTreeNode object to the collection.

Syntax

Add(Caption As String, IconClosed As NodeIconIndexes, [IconOpen As NodeIconIndexes]) As OlapTreeNode

Calling Arguments
Caption
The string value to be displayed in the menu.
IconClosed
The icon resource displayed when the tree node is collapsed.
IconOpen
The icon resource displayed when the tree node is expanded.
Returns

OlapTreeNode object

Remarks

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.

Example

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

(c) 1988-1998 Microsoft Corporation. All Rights Reserved.