0

I am working with Excel 2010 but I assume the idea is constant accross all of Office 2010.

I am making an Add in to have some VBA Macros that will work with all of my files and would like to make a ribbon that has buttons bound to these macros. I know how to make a ribbon through Excel Options --> Customize Ribbon but I would like to make one that is shown whenever the Add In is active. This is so I can distribute the Add in with an easy way to run the macros.

Is there a way I can do this? Thanks

UPDATE:

I have read into it and with what I have at my disposal here (Office 2010 and notepad) I am going to have to make the ribbon as an XML document and then put that with my xlam file. I am just not sure on the specifics at this point.

Community
  • 1
  • 1
Evan
  • 600
  • 2
  • 7
  • 34

2 Answers2

0

I suppose you are developing a VSTO based add-in. If so, you have two ways to go:

  1. VSTO provides a Ribbon designer which you can use to build the custom UI. See Walkthrough: Creating a Custom Tab by Using the Ribbon Designer to get started quickly.
  2. The other way is to use the Ribbon XML markup for buidling a custom UI (available for all kind of add-ins). See Walkthrough: Creating a Custom Tab by Using the Ribbon Designer for more information.

In general, the Fluent UI ( aka Ribbon UI) is described in the following series of articles in MSDN:

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
  • Based on OP mentioning "VBA macros" I suspect this is in the `xlam` world. Item 2 from your list is relevant there, although the Ribbon Editor add-in is much easier to use than editing the XML directly. – Byron Wall Jun 04 '15 at 17:26
  • I am working with an `.xlam` file, and I dont have access to VSTO, just the built in VBA editor and text editors... – Evan Jun 04 '15 at 18:02
  • From what I can tell there is a way to make an XML file that has the items of the ribbon, then unzip the `.xlam` file and put it in there, I just am not solid on the details yet – Evan Jun 04 '15 at 18:07
0

I ended up doing it by hand based on this answer.

Worked well, just a little tricky working with zipping the Excel Files. Never Unzip the entinre file, just open it with explorer and copy files into it and it worked well!

Community
  • 1
  • 1
Evan
  • 600
  • 2
  • 7
  • 34