Opening automatically an xlam in a specific folder

jcarlosd

New Member
Joined
Oct 20, 2002
Messages
40
I have some type of Excel files in a specific folder, and an xlam macro with some utilities just for those files.
So I want to open automatically the .xlam macro when I open a regular .xlsx file in that folder.

I know that I can add some VBA code in each xlsx (or xlsm) file so it opens automatically my xlam file, but it is inconvenient to support and add the VBA in each file there. Or I can place the xlam in my XLSTART folder, but it will be opened every time I open Excel, and it is not what I want.

So I wonder if there is an alternative to add that xlam file to my designated xlsx (or xlasm) files.

J. Carlos
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Its probably simplest to just put the utilities in your xlstart folder and call it a day. Otherwise, another option would be to add code to your Personal Macro Workbook to check every file you open and its a file in the particular folder of interest, then to open your macro workbook (if its not already open). But I don't see that as gaining you very much. When I worked with Excel a lot, I had about three or for workbooks in my startup folder that were always "on" and provided a few different sorts of utilities for my work. Or really (which amounts to the same) you could have just one such workbook and keep various different modules in it for the various special purpose requirements.
 
Upvote 0
Solution
Its probably simplest to just put the utilities in your xlstart folder and call it a day. Otherwise, another option would be to add code to your Personal Macro Workbook to check every file you open and its a file in the particular folder of interest, then to open your macro workbook (if its not already open). But I don't see that as gaining you very much. When I worked with Excel a lot, I had about three or for workbooks in my startup folder that were always "on" and provided a few different sorts of utilities for my work. Or really (which amounts to the same) you could have just one such workbook and keep various different modules in it for the various special purpose requirements.
Thank you very much, xenou. I will do as you suggest, and having always opened my utilities macro workbook. I just wonder whether there was an alternative to it.

J. Carlos
 
Upvote 0

Forum statistics

Threads
1,214,812
Messages
6,121,702
Members
449,048
Latest member
81jamesacct

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top