Constant | Description |
msoBarLeft, msoBarTop, msoBarRight, msoBarBottom | Indicate the left, top, right, and bottom coordinates of the new command bar |
msoBarFloating | Indicates that the new command bar won't be docked |
msoBarPopup | Indicates that the new command bar will be a shortcut menu |
msoBarMenuBar | Indicates that the new command bar will replace the system menu bar on the Macintosh |
Set mybar = CommandBars _
.Add(Name:="Custom", Position:=msoBarTop, Temporary:=True)
With mybar
.Controls.Add Type:=msoControlButton, Id:=2
.Visible = True
End With