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

VB.net Excel Add-in Select a Tab

Hi

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
0
Murray Brown
Asked:
Murray Brown
1 Solution
 
wobbledCommented:
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
http://code.msdn.microsoft.com/office/Activating-Excel-Ribbon-Tab-e0a4f8d4/view/SourceCode#content
0
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Thanks
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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