Help: get read of specific tabs on the ribbon

Remove Specific Tabs

Remove Tabs

Remove all ribbon Tabs at once:

Application.Ribbon.Tabs.Clear
	


Remove specific Tab:

Application.Ribbon.Tabs(TAB_ACCOUNTS).Remove
	

In this case Tabs property of the Ribbon object receives Tab Name as argument. It returns Tab Object.

Remove method of the Tab object deletes it from the Ribbon.


Remove all Tabs, except specific one:

Dim nIndex As Integer
Dim oTab As Object
    
For nIndex = Application.Ribbon.Tabs.Count To 1 Step -1
        
 Set oTab = Application.Ribbon.Tabs(nIndex)
 If oTab.Name <> TAB_PRINT Then
  oTab.Remove
 End If
        
Next