Commanding the Command Bars collection

You manipulate Excel toolbars (and menus, for that matter) by using objects located in the CommandBars collection. The CommandBars collection consists of

1 All Excel built-in toolbars 1 Any other custom toolbars that you create

1 A built-in menu bar named Worksheet menu bar, which appears when a worksheet is active

1 A built-in menu bar named Chart menu bar, which appears when a chart sheet is active

1 Any other custom menu bars that you create

1 All built-in shortcut menus

As I mention at the beginning of this chapter, the three types of CommandBar are differentiated by their Type properties. The Type property can be any of these three values:

1 msoBarTypeNormal: A toolbar (Type = 0) 1 msoBarTypeMenuBar: A menu bar (Type = 1) 1 msoBarTypePopUp: A shortcut menu (Type = 2)

0 0

Responses

Post a comment