Hi,
I'm having a bit of issues with a few addins that we have built. When a user opens the same addin but of different versions, so they both have the same 'OnAction' sub name that they're trying to call. Then it will only call one of them.
This makes sense to me if the sub is public, it finds the first sub named that thing and runs it on click.
But I can't find any way of getting it to run OnAction only for subs within the book that the buttons belong to. No matter what I have tried, the first addin open takes priority and any subsequent duplicate addins opened, will add a menu to the ribbon, but will run the code from first opened addin.
Even the below, which as far as I'm aware should make the code in the first book invisible to the others, doesn't work and both ribbons will only work off first set.
In ThisWorkbook module
Private Sub RibbonControls(ByVal control As IRibbonControl)
.... stuff...
end sub
and in Xml
<button onAction="ThisWorkbook.RibbonControls">
I've tried putting it in a standard module, not declaring the module etc. But nothing seems to stop the behavior.
Anyone come across this and know a way around it? It's really frustrating.