Skip to main content

IRibbonUI.ActivateTabQ method

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 (ControlIDNamespace)

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

Leave a comment

Your email address will not be published. Required fields are marked *

Format your code: <pre><code class="language-vba">place your code here</code></pre>