Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
    
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. –  James Drinkard Mar 2 '12 at 18:46
add comment

1 Answer

up vote 2 down vote accepted

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.

share|improve this answer
    
Gave the answer to you as I changed what I did. HTH. –  James Drinkard Mar 2 '12 at 16:16
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.