keyboard shortcut in addin macro

P

Patrick

How do you assign a keyboard shortcut or a custom button to run a macro which
is in an addin.

These macros dont appear on the macro list

Thanks
 
G

Gord Dibben

Patrick

To assign an Add-in macro to a button from the Forms toolbar or from a button
from the Commands>Macros section, simply right-click on the button and "Assign
Macro".

NOTE: just about any object can have a macro assigned to it. Shape, Wordart,
Picture to name a few.

Type the macro name into the dialog box. No need to preface with the Add-in
name.

Is the Add-in one that you have created?

You can go into the VBE Project Explorer and select the Add-in and expand the
Excel Objects.

Select ThisWorkbook Object.

Then View>Properties.

Change IsAddin to false.

Alt + Q to return to Excel window.

Your macros will be available in Tools>Macro>Macros.

Select a macro.

Hit Options button to set a shortcut key for that macro.

When happy with what you've done, go back to VBE and reset the IsAddin to
True.

Gord Dibben Excel MVP
 
Top