Run code from separate workbook

G

Guest

I have several master files that need to run the same code, so I want to keep
only one set of code in a separate workbook for easier maintenance. The code
works fine, but I have the button in each of the masters to click on to run
the macro. It first opens up the code-only workbook, which then becomes the
active workbook, so all the code is performed on that workbook instead of the
master. I obviously am trying to avoid telling Excel to activate the specific
master file since it will be different in each case. So my question is, how
can I activate the master file without specifying a file name, OR how can I
open the code-only workbook and run the macro without activating that
workbook? Any help would be greatly appreciated!
 
G

Guest

hi,
put the code in a workbook named personal. put your personal file in the xl
startup folder then hide the personal workbook. each time xl is opened the
personal file will open and be hidden in the background but all macros will
be available.

regards
FSt1
 
G

Guest

But it needs to be able to be opened by other people as well. I think I found
a workaround. Thanks.
 
G

Gord Dibben

I would place the macros into a new workbook and save that as an add-in.

Load it through tools>add-ins and it is always available for any open workbook.

Or stick the macros into Personal.xls if you have one.


Gord Dibben MS Excel MVP
 

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

Top