Share via


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.

Version Information

Version Added: Office 2010

Syntax

expression .ActivateTabQ(ControlID, Namespace)

expression An expression that returns a 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) file 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

Concepts

IRibbonUI Object

IRibbonUI Object Members