Microsoft Office Tutorials and References
In Depth Information
The CommandBars collection contains all the command bars defined in Excel. For the most
part, the CommandBars collection is just a normal collection with properties and methods
such as Item , Count , and Add . However, it also has some properties that determine how the
command bars operate, including enabling or disabling features such as adaptive menus,
menu customization, and menu animation.
Table 17-1 contains a list of the key properties and methods of the CommandBars collection.
Table 17-1. Key Properties and Methods of the CommandBars Collection
Property: when True , means that adaptive menus will be
used in Excel.
Method: creates a new command bar object and adds it to
CommandBars . Name is the name of the new command bar,
Position specifies where the command bar is located,
MenuBar , when True , means that the command bar replaces
the currently active menu bar. Temporary , when True , means
that the command bar will be automatically deleted when
Property (read-only): returns the number of CommandBars in
Property: when True , means that command bars may not be
customized by the user.
FindControl(Type, Id, Tag,
Method: returns an object reference to the
CommandBarControl object that matches the specified
criteria. Type specifies the type of control using the
MsoControlType enumeration. Id specifies the name of the
control. Tag searches for matches using the control’s Ta g
property. Visible , when True , limits the search to only those
controls that are visible; Recursive , when True , searches
through the current CommandBar object and all of its pop-up
Property: returns the command bar object specified by Index .
Property: when True , means that toolbar buttons will be
displayed larger than normal.
Property: specifies how the command bar is animated.
Can specify one of the following: msoMenuAnimationNone ,
msnMenuAnimationRandom , msoMenuAnimationSlide , or