Applies To
Toolbars Collection.
Description
Creates a new toolbar. Returns a Toolbar object.
Syntax
object.Add(name)
object
Required. The Toolbars object.
name
Optional. A string that specifies a name for the new toolbar. If omitted, Microsoft Excel uses a default name (such as "Toolbar 1").
Example
This example creates a new toolbar, adds the Camera button (button index number 228) to it, and then displays the new toolbar.
Set myNewToolbar = Toolbars.Add(Name:="My New Toolbar") myNewToolbar.ToolbarButtons.Add Button:=228 myNewToolbar.Visible = True