Microsoft Office Tutorials and References
In Depth Information
Table 17-6. Unique Properties and Methods of the CommandBarButton Object
Property/Method
Description
BuiltInFace
Property: True if the face of a command bar button is the original
face for the button. Setting this value to True will restore the
built-in face.
CopyFace
Method: copies the current face to the clipboard.
FaceId
Property: contains the Id value for a particular face that will be
displayed on the button. A FaceId value of zero means that the
command bar button has a custom face.
PasteFace
Method: pastes the face from the clipboard to the command bar
button.
ShortcutText
Property: contains text displayed to the caption that represents a
shortcut. Remember that this property works only for command
bar buttons that have a valid OnAction macro.
State
Property: indicates the visual state of the button. Can be one of
the following values: msoButtonDown , msoButtonMixed , or
msoButtonUp .
Style
Property: contains the way the button is displayed .
msoButtonAutomatic chooses the appropriate style based on
the values set in the properties; msoButtonCaption displays the
caption as text on the button; msoButtonIcon displays the icon
identified by FaceId on the button; msoButtonIconAndCaption
displays the caption to the right of the icon;
msoButtonIconAndCaptionBelow displays the caption below the icon;
msoButtonIconAndWrapCaption displays the complete caption
to the right of the button even if it has to wrap the text to fit;
msoButtonIconAndWrapCaptionBelow displays the text below the
icon, wrapping as needed; and msoButtonWrapCaption
displays the complete text from the caption, wrapping the text
as necessary.
The Style property dictates the way the control will be drawn on the screen. Basically, you can
choose to display the text from the Caption property or the icon specified by the FaceId propĀ­
erty or both. If you choose both, you can position the caption to the right of the icon or below
the icon.
You can choose to display a custom button in any of three different states (up, down, and
mixed) using the State property. This is useful if you want to use the button to indicate the
status of your code in the same way as the Bold button works. Although the up and down
states are self-explanatory, the mixed state is not. This state is useful to reflect a situation
where the button should be both up and down, which might occur when you select a range
of cells that includes text that is both normal and bold.
Search JabSto ::




Custom Search