• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 506
  • Last Modified:

VB.net Excel Add-in Select a Tab


I have an Excel Add-in with  5 ribbon tabs

What code would I use from a standard module to select a tab

Something similar to the following?

 Globals.Ribbons.Ribbon1.Tab1.Visible = True
Murray Brown
Murray Brown
1 Solution
you are very close

here is an example of how to set the tab in the ribbon depending on the sheet selected

Dim tabtoActivate As Microsoft.Office.Tools.Ribbon.RibbonTab = Nothing
            If (sheet.Name = "Sheet1") Then
                tabtoActivate = Globals.Ribbons.CustomRibbon.Tabs(0)
            ElseIf (sheet.Name = "Sheet2") Then
                tabtoActivate = Globals.Ribbons.CustomRibbon.Tabs(1)
            End If

Microsoft provide a very easy example of this that you can download as a solution - check out
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now