Returns the specified applet object.
Set variable = object.Item ( Index ) |
- Index
- Required. A Variant that specifies the name or index of the toolitem.
Index is a variant specifying the toolitem to reference. It can be either the index or the name of the toolitem. For example, if your custom toolbar "MyToolBar" contains a toolitem named "btnOne" that has an index of 1, the following two lines of code will yield the same result:
Set toolBtnOne = Application.ToolBars("MyToolBar").Item(1)
Set toolBtnOne = Application.ToolBars("MyToolBar").Item("btnOne")
The Item method is the default method for the ToolBar collection. Therefore, the following two lines of code will yield the same result:
Set toolBtnOne = Application.ToolBars("MyToolBar").Item("btnOne")
Set toolBtnOne = Application.ToolBars("MyToolBar")("btnOne")
Set toolBtnOne = Application.ToolBars("MyToolBar").Item(1)
Set toolBtnOne = Application.ToolBars("MyToolBar").Item("btnOne")
The Item method is the default method for the ToolBar collection. Therefore, the following two lines of code will yield the same result:
Set toolBtnOne = Application.ToolBars("MyToolBar").Item("btnOne")
Set toolBtnOne = Application.ToolBars("MyToolBar")("btnOne")