Activate a given tab in the ribbon

Stevenn

Active Member
Joined
Feb 8, 2012
Messages
259
Is there a way to activate either the Add-Ins tab or a custom tab in the ribbon when the workbooks opens? Maybe something like:

Code:
Private Sub Workbook_Activate()
  ActivateAddInsTab()
End Sub
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Hello there

There is no other way than using SendKeys in VBA.
Send an Alt-... combination just as a manual shortcut would do.
 
Upvote 0
in xl2010 you can now activate tabs.

You need to create ribbon xml.
Note the extra space in order to stop forum converting stuff to ***

< customUI
xmlns="http://schemas.microsoft.com/office/2009/07/customui"
o nLoad="rbx_o nLoad"/>

and in a standard code module.
Code:
Public g_rbxUI As IRibbonUI
Public Sub rbx_o nLoad(ribbon As IRibbonUI)
'
' Code for ****** callback. Ribbon control customUI
'
    Set g_rbxUI = ribbon

    g_rbxUI.ActivateTabMso "TabAddIns"
    
End Sub

You can also use the approach explained by Tony Jollans that will work in xl2007+
http://www.wordarticles.com/Shorts/RibbonVBA/RibbonVBADemo.php
 
Upvote 0
Thank you for the information Andy.
 
Upvote 0
Years later, another grateful soul has found a solution in your words of wisdom! :) Many thanks, Andy.

Best regards,

Greg M
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,183
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top