The Add method of the OlapMenuItems collection adds a new OlapMenuItem object to the collection. It returns an object of type OlapMenuItem.
Set vnt = object.Add(MenuType As OlapMenuTypes, [Caption As String], [Key As Long], [ParentKey As Long], [Flags As OlapMenuFlags])
vnt
An instance of OlapMenuItem that receives the instance of the new member.
object
An instance of the OlapMenuItems collection.
MenuType
A constant from the OlapMenuTypes enumeration.
Caption
The string value to be displayed in the menu.
Key
User-defined key value to be used by the add-in.
ParentKey
Associates a child menu item with its parent. Used when the parent menu item is defined using the mnuflagPopup option in MenuType.
Flags
A bitmask of values from the OlapMenuFlags enumeration.
The Add method is used to populate the OlapMenuItems collection with menu items to be displayed when the user right-clicks a tree node. Call this method for each menu item you want to add.