Calling MACROS from Excel ADD-IN


Posted by bill.roberts on March 10, 2000 11:50 AM

Accoring to MICROSOFT,

Application.Run("ADDIN.XLA!Macro_Name")

Will call a MACRO from an ADDIN.

Now, is it possible to assign such a statement to a button?

In this way, portability is way improved.

The alternative is to bridge through an intermediate routine.

I would envision calling a macro from the PERSONAL.XLS that would in turn call the macro within the ADD-IN.

So,

Application.Run("ADDIN.XLA!Macro_Name")

Will call a MACRO from an ADDIN.

Is it possible to assign such a statement to a button?

Posted by bill.roberts on March 10, 2000 12:16 PM


Oh, your not going to believe this!!

Even though the MACRO does NOT appear in the list when assigning one to a button, JUST HARD CODE THE MACRO NAME (and REFERENCING FILE if the MACRO name occurs more than once) IN AND IT WILL WORK !!!!!!!!!!!!!!

Now, just need to NAMED BUTTONS to toolbar
and then assign MACRO and PICTURE through VBA.

Anyone out there can help??

Bill

Posted by Tom Morales on March 10, 2000 3:13 PM

Bill
Try:
Tools/Customize/Commands/Macros
Pull a button icon onto your toolbar. Right click the new icon, and choose "assign macro"
Tom



Posted by bill.roberts on March 13, 2000 7:43 AM

Tom,

Thank you for your response but,
I want to do these things programmatically.

Bill