Reassigning macro to add in function

  • Thread starter Thread starter Tom Corcoran
  • Start date Start date
T

Tom Corcoran

I have a button assigned to a macro that I moved to an add on. To reassign
it in the macro name dropdown I type 'My vba code.xla'!MyFunctionName.
But when I click on the button it says Macro MyFunctionName not found.
When I go back into to edit the macro name it has stripped away the xla
reference and just left the macro name which suggests it has found it.
Anyone know what the problem might be?

Regards, Tom.
 
Tom,

Code in add-ins is not run the same way as "local" (in the same workbook or
in personal.xls) code. The button should be made to run a "local" macro ,
which runs the code in the add-in by means of a call like:
Run MyFunctionName
provided, of course, that the add-in is already loaded.

HTH,
Nikos
 
Hi Nikos,

Nikos Yannacopoulos said:
Code in add-ins is not run the same way as "local" (in the same workbook or
in personal.xls) code. The button should be made to run a "local" macro ,
which runs the code in the add-in by means of a call like:
Run MyFunctionName
provided, of course, that the add-in is already loaded.

Thanks for the post. My .xla is stored in the alternate startup file
location and this file is checked in the add-ins list. How can I check that
it is loaded? When I try and open this xla file nothing happens (there was
no password set). This xla file was originally a xls file containing the
macros which I saved as an xla in the alternate startup file location and
then added it as an add-in.

Any advice appreciated,

Thanks, Tom.
 

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

Back
Top