IRibbonUI.ActivateTabQ method (Office)

Activates the specified custom tab on the Microsoft Office Fluent Ribbon UI. Uses the fully qualified name of the tab, which includes the ID and the namespace of the tab.

Syntax

expression.ActivateTabQ (ControlID, Namespace)

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.
Namespace Required String Specifies the namespace of the tab element.

Return value

Nothing

Example

The following code activates the qualified tab "test:MyTab". It assumes that you have defined the tab in the Ribbon definition file (customUI.xml) as follows. The subroutine that follows is called from the onLoad attribute of the <customUI> element in the customUI.xml file.

  • xmlns:test="testnamespace"

  • <tab idQ="test:MyTab">

Public myRibbon As IRibbonUI 
 
Sub OnLoad(ByVal control As IRibbonControl) 
 myRibbon.ActivateTabQ "MyTab", "testnamespace" 
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.