How to make a macro present in all workbooks?

K

kayard

Hi, does anybody know how can I make a new macro just recorded appear i
all workbooks ?

I tried creating a template called Book.xlt in the proper directory an
then I recorded the macro in that file, i saved as a template but i
didn't work ..
 
D

Dave Peterson

Instead of putting the code in every workbook, you may find it easier to create
a workbook that stores all your macros.

If you won't share this file with others, then call it personal.xls. If you
share it with others, call it KayardsUtils.xls.

Store it in your XLStart folder.

Then when excel starts, this macro workbook will be opened and you'll be able to
access the macros.

By dedicating a workbook to hold the macros, you won't have millions (er, 10s)
of files that need to be updated when the routine should change.

And to give you/users a way to run that macro, I'd either use stuff added to the
worksheet menubar or a dedicated toolbar.

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)
 

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