Properties of Command Bar controls

CommandBar controls have a number of properties that determine how the controls look and work. This list contains some of the more useful properties for CommandBar controls:

i Caption: The text displayed for the control. If the control shows only an image, the Caption appears when you move the mouse over the control.

i FaceID: A number that represents a graphics image displayed next to the control's text.

i BeginGroup: True if a separator bar appears before the control.

i OnAction: The name of a VBA macro that executes when the user clicks the control.

i BuiltIn: True if the control is an Excel built-in control.

i Enabled: True if the control can be clicked.

i ToolTipText: Text that appears when the user moves the mouse pointer over the control.

When you work with toolbars, you can turn on the macro recorder to see what's happening in terms of VBA code. Unless you're editing button images, the steps you take while customizing toolbars generate VBA code. By examining this code, you can discover how Excel arranges the object model for toolbars. The model is pretty simple.

0 0

Post a comment