Quote Originally Posted by dschmitt View Post
I came across an Excel add-in (.xlam) that appears to use VBA script to activate Ribbon groups. I would like to know how this is done.

Illustrated in more detail but simplified. The xlam file creates a new Ribbon tab with one Ribbon group containing one button.
If I click on this button additional ribbon groups are added to the Ribbon tab.

A look in the VBA Editor VBA project list shows that no file was opened by clicking the Ribbon button.
The Ribbon xml file of this xlam only contains the script for the one Ribbon tab, Ribbon group and button.

I have the impression that the script activated by the button calls in the additional Ribbon groups and buttons.
And this seems to work without opening another xlam file. I have no idea how that is done.

Can somebody explain to me how to do that?
I believe that the XLAM has the Fluent XML in it for all the groups, but with only one Group visible; the other groups are also there but Not visible. It doesn't really 'create' a new tab, but has one itself

Clicking the button changes a status variable and then Invalidates the ribbon.

The getVisible callback for the groups then makes the second etc. groups visible

I can make up a small example if your want.