PDA

View Full Version : [SOLVED:] Accessing the Add-ins Toolbar



Opv
07-02-2017, 04:55 PM
After creating the desired VBA code for a particular workbook which includes a customized toolbar, Excel adds an "Add-ins" tab to the ribbon. Is there any way to use VBA to cause Excel to automatically switch to the Add-ins toolbar upon opening the workbook?

Aflatoon
07-03-2017, 05:31 AM
It depends - which version of Excel are you using?

Opv
07-03-2017, 05:53 AM
It depends - which version of Excel are you using?

I'm sorry. I normally try to include that information. I am running Office Enterprise 2007. Thanks

Aflatoon
07-03-2017, 06:08 AM
In that case, SendKeys is your simplest option but it's far from reliable. Alternatively you can try using Accessibility but the code is really complicated - see Tony Jollans' article here: http://www.wordarticles.com/Shorts/RibbonVBA/RibbonVBADemo.php

Opv
07-03-2017, 08:31 AM
In that case, SendKeys is your simplest option but it's far from reliable. Alternatively you can try using Accessibility but the code is really complicated - see Tony Jollans' article here: http://www.wordarticles.com/Shorts/RibbonVBA/RibbonVBADemo.php

Thanks. The article at the above link is far more complex than I care to pursue for my purposes. I was simply looking for a simple way (if there is one) to avoid having to click on the Add-ins tab each time the workbook is opened, as it is the only toolbar I need in this particular workbook.

The SendKeys might be worth some testing. I'll give that a try.

Aflatoon
07-03-2017, 08:59 AM
In that case, you should really look at using CustomUI to create a proper custom Ribbon tab as it would allow you to use the startFromScratch option to remove all the other tabs for that workbook, which would leave yours active by default!

Opv
07-03-2017, 09:02 AM
In that case, you should really look at using CustomUI to create a proper custom Ribbon tab as it would allow you to use the startFromScratch option to remove all the other tabs for that workbook, which would leave yours active by default!

Thanks