IRibbonUI.ActivateTab method (Office)
Activates the specified custom tab. This method returns S_FALSE if there is no Ribbon or the Ribbon is collapsed.
Syntax
expression.ActivateTab (ControlID)
expression An expression that returns an IRibbonUI object.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
ControlID | Required | String | Specifies the Id of the custom Ribbon tab to be activated. |
Return value
Nothing
Example
The following code makes the custom tab the active tab.
Public myRibbon As IRibbonUI
Sub tabActivate(ByVal control As IRibbonControl)
myRibbon.ActivateTab (control.ID)
End Sub
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.