Can I run a macro in an xla from a button on a sheet

  • Thread starter Thread starter Michael
  • Start date Start date
M

Michael

I want buttons on worksheets in my workbook to run a macro that is
stored in an add-in

I have called the macro 'Public Sub xxx()'

I have created a reference to the add-in in the workbook that will
have the buttons.

But I can't 'see' the macros in the add-in to be able to assign them
to the buttons.

Can I do it?

how?

Cheers

Michael
 
There are two ways to call procedures in other workbooks (incl addins).
First was is to set a reference (tools, References) to the project name (be
sure to have changed from the default VBAProject. But for your needs
probably better to use the Run method (though you won't get any
intellisense)

ret = Application.Run("myAddin.xla!moduleName.ProcName")

you can also include arguments.

Regards,
Peter T
 
Back
Top