ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Call Macro in Add-in (https://www.excelbanter.com/excel-programming/329098-call-macro-add.html)

Andibevan[_2_]

Call Macro in Add-in
 
Hi All,

I am sure this is a really easy one but I can't work it out.

How do I call a macro that is stored in an add-in I created. I want to
assign it to a button on the toolbar but when I try to assign a macro to the
button the macro is not availble

Ta

Andi



Tom Ogilvy

Call Macro in Add-in
 
Just type in (for example)

MyAddin.xls!MyMacro

in the dialog. Change to reflect your addin name and the actual macro
name. (hey, some people take these things literally).

Make sure your addin in loaded.



--
Regards,
Tom Ogilvy


"Andibevan" wrote in message
...
Hi All,

I am sure this is a really easy one but I can't work it out.

How do I call a macro that is stored in an add-in I created. I want to
assign it to a button on the toolbar but when I try to assign a macro to

the
button the macro is not availble

Ta

Andi





Gary Brown[_5_]

Call Macro in Add-in
 
Assume the Add-in is called MyAddin.xla and the macro is called MyMacro...
MyAddin.xla!MyMacro
should do it although I like to use...
Call MyAddin.xla!MyMacro
because it identifies it as a macro when I'm reviewing old code. Works
either way.
HTH,
--
Gary Brown



"Andibevan" wrote:

Hi All,

I am sure this is a really easy one but I can't work it out.

How do I call a macro that is stored in an add-in I created. I want to
assign it to a button on the toolbar but when I try to assign a macro to the
button the macro is not availble

Ta

Andi




Andibevan[_2_]

Call Macro in Add-in
 
Aha - I was missing the obvious that although the macro wasn't available to
select from the drop-down list, you can still load it by typing the name in.

Thanks Gary and Tom.

Andi


"Gary Brown" wrote in message
...
Assume the Add-in is called MyAddin.xla and the macro is called

MyMacro...
MyAddin.xla!MyMacro
should do it although I like to use...
Call MyAddin.xla!MyMacro
because it identifies it as a macro when I'm reviewing old code. Works
either way.
HTH,
--
Gary Brown



"Andibevan" wrote:

Hi All,

I am sure this is a really easy one but I can't work it out.

How do I call a macro that is stored in an add-in I created. I want to
assign it to a button on the toolbar but when I try to assign a macro to

the
button the macro is not availble

Ta

Andi







All times are GMT +1. The time now is 11:56 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com