編輯

共用方式為


_CommandBars.FindControl(Object, Object, Object, Object) Method

Definition

Returns a CommandBarControl object that fits the specified criteria.

public Microsoft.Office.Core.CommandBarControl FindControl (object Type, object Id, object Tag, object Visible);
abstract member FindControl : obj * obj * obj * obj -> Microsoft.Office.Core.CommandBarControl
Public Function FindControl (Optional Type As Object, Optional Id As Object, Optional Tag As Object, Optional Visible As Object) As CommandBarControl

Parameters

Type
Object

Optional MsoControlType. The type of control.

Id
Object

Optional Object. The identifier of the control.

Tag
Object

Optional Object. The tag value of the control.

Visible
Object

Optional Object. True to include only visible command bar controls in the search. The default value is False. Visible command bars include all visible toolbars and any menus that are open at the time the FindControl method is executed.

Returns

Remarks

If the CommandBars collection contains two or more controls that fit the search criteria, FindControl returns the first control that's found. If no control that fits the criteria is found, FindControl returns Nothing.

Applies to