0

I am currently working on creating my own Ribbon in excel. I wrote out the specific code in a module in a macro-enabled workbook that I will subsequently save as an Excel add-in (.xlam). However, whenever I try to run the module in my macro enabled workbook, the select macro window appears and no code is executed (see picture for reference). Subsequently, I think this is what is also causing my ribbon button to give the following error when clicked "The macro may not be available in this workbook or all macros may be disabled."

Any help/suggestions would be appreciated. Thanks.

enter image description here

BigBen
  • 46,229
  • 7
  • 24
  • 40
S_Z
  • 35
  • 4
  • Subroutines with parameter(s) will not appear in the list of macros to run. – BigBen Jun 16 '20 at 01:00
  • I see. Would you perhaps suggest a means for correcting my UI code then? I try to call a sample macro in the uiEditor as 'onAction="Header"' with the actual code in the module appearing as 'Sub Header(control As IRibbonControl)' followed by additional lines of code. Not sure as to why it doesn't work - perhaps I'm misunderstanding something. Thanks. – S_Z Jun 16 '20 at 01:05
  • If you run any code from a custom ribbon button, does it work? – Ricardo Diaz Jun 16 '20 at 01:33
  • Currently no. Previously, I've had all the code in "This Workbook" where it did work as opposed to in modules. I switched to having the code in modules as opposed to in "This Workbook" but I may be incorrectly linking the XML to the module code thus causing the buttons in the custom ribbon to be unable to execute the macro. I'm not sure. – S_Z Jun 16 '20 at 01:38

0 Answers0