Skip to main content

IRibbonUI.ActivateTab method

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

Another example: Show Custom Ribbon Tabs When Workbook is Open

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>