Setting up a macro that can be ran from any excel file.


Bern Notice

I built a macro that I want to be able to run from any excel file I open. I
think you have to save it in a "personal" workbook that is hidden, but I'm
having troubles setting it up and editing it in a personal workbook. I get a
message telling me to use the unhide command, but not sure where to find this.

How do you create a macro to be used globally?

Dave Peterson

You don't need to save your macro workbook with the personal.xls* name. You can
use any name you want.

In fact, I'd use a different name. Then I could share my macros with others
without having it conflict with their personal.xls* workbook (lots of people
have them!).

So you can start any new (or existing workbook), record/edit your macro in that
workbook. You'll just have to open this macro workbook before you can run the

You can use tools|macro|macros and select the macro to run (or hit alt-f8 to see
that dialog).

Or you can make the interface a little nicer.

Saved from a previous post:

For additions to the worksheet menu bar, I really like the way John Walkenbach
does it in his menumaker workbook:

Here's how I do it when I want a toolbar:
(from Debra Dalgleish's site)

In xl2007, those toolbars and menu modifications will show up under the addins.

And if you use xl2007:

If you want to learn about modifying the ribbon, you can start at Ron de Bruin's
site: -- For macros for all workbooks (saved as an

And Bob Phillips shows a way to use a wrapper so that it can work in both xl2003
and xl2007.

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