Returns the specified toolitem object (tool item or menu item).
Set variable = object.Item ( Index ) |
- Index
- Required. A Variant that specifies the name or index of the toolitem.
ToolItem Object
Index is a variant specifying the tool item or menu item to reference. It can be either the index or the name of the tool/menu item, but it is recommended that the name be used (since indexes will change dynamically when menu items are promoted).
The Item method is the default method for the ToolItem collection. Therefore, the following two lines of code will yield the same result:
Set dropDownBtnOne = Application.ToolBars("MyToolBar").Item("btnOne")
Set dropDownBtnOne = Application.ToolBars("MyToolBar")("btnOne")