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


B

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?
 
Ad

Advertisements

D

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
macro.

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:
http://j-walk.com/ss/excel/tips/tip53.htm

Here's how I do it when I want a toolbar:
http://www.contextures.com/xlToolbar02.html
(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:
http://www.rondebruin.nl/ribbon.htm
http://www.rondebruin.nl/qat.htm -- For macros for all workbooks (saved as an
addin)
or
http://www.rondebruin.nl/2007addin.htm

And Bob Phillips shows a way to use a wrapper so that it can work in both xl2003
and xl2007.
http://msmvps.com/blogs/xldynamic/archive/2010/03/27/deploy-me-simple.aspx
 

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