Activate Custom Toolbar (Add-Ins) at Excel Workbook Opening

mmrm

New Member
Joined
Jun 29, 2021
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Is there any way to open a workbook with Add-Ins menu activated which has my custom command bar and buttons?
Excel usually opens with Home menu active, I'd make it change to Add-Ins menu active while I open my workbook. Any help?
I've spent a lot of time searching for any vba code for this. Nothing found. Excel macro recorder does not record any menu clicks so could not get any help there too.
Thank you.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
First, add the following XML code to your workbook...

XML:
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Initialize"/>

If you need help in adding the XML code to your workbook, have a look at the following link...


Then, add the following VBA code in a regular module (Visual Basic Editor >> Insert Module)...

Code:
Option Explicit

Public MyRibbon As IRibbonUI

Public Sub Initialize(ribbon As IRibbonUI)
'
' Code for Initialize callback.
'
    Set MyRibbon = ribbon
    
    MyRibbon.ActivateTabMso "TabAddIns"
    
End Sub

Now, save, close, and re-open your workbook.

Hope this helps!
 
Upvote 0
Thank you Domenic. I will try it and let you know. Thanks a lot for your response.
 
Upvote 0

Forum statistics

Threads
1,214,935
Messages
6,122,337
Members
449,077
Latest member
Jocksteriom

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