Using VBA macros from an Add-In

D

deluxes

I have created a large number of VBA macros and saved them as an
add-in. When I load the add-in in a sheet none of the macros show up
under the macro listing. I would like to be able to assign an add-in
macro to a button on my sheet or at least be able to run the macro.
Any help?
 
J

JE McGimpsey

deluxes said:
I have created a large number of VBA macros and saved them as an
add-in. When I load the add-in in a sheet none of the macros show up
under the macro listing. I would like to be able to assign an add-in
macro to a button on my sheet or at least be able to run the macro.
Any help?

First, add-ins aren't loaded into a sheet, so I'm not sure what exactly
you're referring to.

In any case, while add-in macros don't show up in the macro list, they
are available via the list. When assigning the macro to the button, type
in the macro name. When you've typed in a valid name, the Edit button
will enable.

You can also set the button's macro programmatically, e.g.:

ActiveSheet.Buttons(1).OnAction = "MyAddIn.xla!MyMacro"


As in the Assign Macro dialog, you can also run any add-in macro via the
Tools/Macro/Macros... dialog. Just type in the name of the macro - when
you've typed in a valid name, the Run button will be enabled.
 
D

deluxes

Is there any way to get them to show up in the macros list so they can
merely be clicked on?
 
D

deluxes

I have it working now. I had "-" in my title of the add-in, removed it
and it works. Thanks for your help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top