Skip to main content

CommandBars.Add method

Table of contents
  1. Syntax
  2. Parameters

Creates a new command bar and adds it to the collection of command bars.


expression.Add (NamePositionMenuBarTemporary)

expression Required. A variable that represents a CommandBars object.


Name Required/Optional Data type Description
Name Optional Variant The name of the new command bar. If this argument is omitted, a default name is assigned to the command bar (such as Custom 1).
Position Optional Variant The position or type of the new command bar. Can be one of the MsoBarPosition constants.
MenuBar Optional Variant True to replace the active menu bar with the new command bar. The default value is False.
Temporary Optional Variant True to make the new command bar temporary. Command bars are deleted when the container application is closed. The default value is False.

Leave a comment

Your email address will not be published. Required fields are marked *

Format your code: <pre><code class="language-vba">place your code here</code></pre>