Hard to say. Sounds complicated using an addin to display ribbon elements and then having other workbooks enabling or disabling them. What are you trying to do with that setup?
Hi,
Well, I am trying to reproduce a 2002 Excel macro file with Excel 2010.
The old excel file (on startup) create custom menu options.
After clicking the first menu option (which runs macros) the second menu option would become enabled, after clicking this the third and so on...
Also, one of the menu options would allow you to open another excel file (whilst retaining the custom menu) and continue running macros which processed the opened file by selecting the menu options.
In 2002 the menu is application-wide, in 2010 the ribbon belongs to the file itself. Thus if I kept the ribbon in my actual macro file (XLSM) - after opening the other excel file to be processed the ribbon would disappear.
So...i needed to create a ribbon in an XLAM file.
It works well when I manually open the XLAM first, then open my XLSM file, from which in turn i can open another excel file and process it using the ribbon buttons.
However I wanted to try and eliminate the step where the user has to open the XLAM file first (by putting it in the addins) - but alas this breaks the feature of enabling/disabling the ribbon buttons.
I kind of have a work around now. I have put some code in the ribbon file to load the XLSM file - much better - although it still means that the two files have to be kept together.