Mac – How to execute an Excel 2010 addin

macrosmicrosoft excelvba

I created a macro using vba using Excel 2010. I then needed to make it available for everyone on my team by turning it into an addin.

So, I took my macro

  1. and opened a new workbook
  2. pasted the code in it from the macro
  3. then saved it as an .xlam file
  4. then added it in as an addin to my excel spreadsheet, so it's initialized and shows up under the addins button with a checkmark next to the name.

I thought I did it correctly, however, when I try the ctrl key + "the letter I used", which is the keystroke combination I used when I created the addin, nothing happens?

I'm a newbie with the excel vba stuff, so is this the correct way to create an addin for others to use?

Aftermath:

Creating an addin for Excel 2010 and then making a ribbon entry in the toolbar is too complicated for what I was trying to do. It also seems that you can't use key combinations to run an addin. So, I opted for using a global macro and that worked.

Here is a tutorial that I followed to create a global macro.

Best Answer

Your summary is the right way to do it (except the terminology in #4, the addin gets loaded with excel, not the spreadsheet. But if you see it in the list of installed addins just by starting excel, then its ok.) It must be that there is a bug in the macro and its not doing what you expect to see. To verify this, start VBA (load the Developer tab from the excel menu) by clicking on the Visual Basic icon in the developer's tab. This should show your addin under modules. This will list your macro code hopefully with its comment showing they keyboard shortcut. With the first line selected, hit f9 to hit a breakpoint. Then go back to excel and enter your short cut key. If all is installed ok, then the VB debugger should come up and stop at the breakpoint in your macro.

Related Question