FaceId Property

Applies To

CommandBarButton object.

Description

Returns or sets the ID number for the button face that's currently assigned to the specified command bar button control. Read/write Long.

Remarks

The FaceId property dictates the look, but not the function, of a command bar button. The Id property of the CommandBarControl object determines the function of the button.

The value of the FaceId property for a command bar button with a custom face is 0 (zero).

See Also

BuiltInFace property, CopyFace method, PasteFace method.

Example

This example adds a command bar button to a custom command bar. Clicking this button is equivalent to clicking the Open command on the File menu because the ID number is 23, yet the button has the same button face as the built-in Charting button. When you click this button, the Open dialog box is displayed.

Set newBar = CommandBars.Add(Name:="Custom2", _
    Position:=msoBarTop, Temporary:=True)
newBar.Visible = True
Set con = newBar.Controls.Add(Type:=msoControlButton, Id:=23)
con.FaceId = 17