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?


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.

  • Agree that addin ribbons or menus is overkill. Your link to the tutorial is a good resource. Still can't make your steps not work. I wonder if its a case of having duplicate or reserved conflicting macro keys? I was testing on a new system. – jdh Mar 2 '12 at 17:31
  • I deleted the left over items in the addins folder. From what I've read a addin doesn't get executed like a macro. For this task I was just trying to get a simple solution working. The global macro did the job and my boss is happy with it. – user115273 Mar 2 '12 at 18:46

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.

| improve this answer | |
  • Gave the answer to you as I changed what I did. HTH. – user115273 Mar 2 '12 at 16:16

I ran into this problem myself. The only solution I have is to record the macro in an excel workbook first. Then, drag and drop THE MODULE from the open workbook into the add-in modules. This will be a copy of the above module, but the keyboard shortcut you assigned to it will thankfully persist.

I just record a garbage macro and move it in there, then copy the code from my real module afterwords.

Felt so great to figure this out, I felt like I had to reply to the 5 year old posts I found on the subject!!!

| improve this answer | |
  • Can you be more specific? – Ramhound Mar 2 '17 at 19:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy