Search code examples
vbaexcelribbonribbonx

Making a Ribbon Tab as part of an Excel 2010 Macro Enabled Workbook


I have a workbook that uses a user form full of buttons to organize and return data and execute functions. I would like to upgrade this form to a Ribbon tab with all of these functions that is only there for this specific workbook.

I have worked with the customUI.xml approach before while making an add in but can't do the same change to the excel fileand make it work.

Here is what I tried:

  1. rename the excel file to a zip file
  2. add a folder customUI to the .xlsm.zip file
  3. add customUI.xml to that folder

When I open the file I don't see my ribbon.

Unfortunately I have to do it the manual way because my work has very strict software guidelines and the Ron de Bruin application got denied. But I did it manually for the add in I created and that is working fine.

Does anyone know of the differences between an add in tab and a tab in a workbook?


Solution

  • Figured it out, as @Raystafarian and @Nathan_Sav pointed out I was missing the line <Relationship Target="customUI/customUI.xml" Type="http://schemas.microsoft.com/office/2006/relationships/ui/extensibility" Id="rid4"/> from the rels/.rels file inside the excel sheet. Adding that showed the ribbon tab and all my code linked as expected.