I have an add-in which I manage. I have two "versions" of the add-in. One is the add-in saved as a workbook and the other is that same workbook, but just saved as an add-in file (".xlam").
I've recently been unable to run some buttons on the ribbon when I have just the add-in file (".xlam") open (and the workbook version closed). The error I get on certain macros is this:
"Cannot run macro 'YourMacro'. The macro may not be available in this workbook or all macros may be disabled."
I've checked and my macros are not disabled. And as I've said, other macros on the ribbon from this same add-in work, it's just a set of macros which seemingly have nothing in common that don't work.
I've found that if I rename the macros that I cannot run, they will work. So, even though the macro 'YourMacro' won't work, if I change the ribbon to call 'YourMacro2" and change the macro name to 'YourMacro2', then it works.
My hypothesis is that somehow Excel is pointing to the workbook version (".xlsm") of the add-in rather than the add-in version (".xlam"). And it's giving me an error since the workbook version is closed. When I have the workbook version open, all of the buttons work. But that's just my guess right now... and even if that's the actual problem, not sure how to fix it.
I've recently been unable to run some buttons on the ribbon when I have just the add-in file (".xlam") open (and the workbook version closed). The error I get on certain macros is this:
"Cannot run macro 'YourMacro'. The macro may not be available in this workbook or all macros may be disabled."
I've checked and my macros are not disabled. And as I've said, other macros on the ribbon from this same add-in work, it's just a set of macros which seemingly have nothing in common that don't work.
I've found that if I rename the macros that I cannot run, they will work. So, even though the macro 'YourMacro' won't work, if I change the ribbon to call 'YourMacro2" and change the macro name to 'YourMacro2', then it works.
My hypothesis is that somehow Excel is pointing to the workbook version (".xlsm") of the add-in rather than the add-in version (".xlam"). And it's giving me an error since the workbook version is closed. When I have the workbook version open, all of the buttons work. But that's just my guess right now... and even if that's the actual problem, not sure how to fix it.
Last edited: