Saving a macro to be available to all workbooks

M

Matilda

Hi,

How can I save a macro that has functions I want to be available to all my
workbooks?

When I save them, they seem to be specific to the document in which they
were created, so if I want the same sequence of actions I have to set it up
again.

Many thanks,


Matilda
 
D

DS-NTE

Save them in your Personal.xls. If it dont exist, create it by recording a
macro and choose save in Personal Workbook (or ist Global Workbook?)...., or
you can store them as an add-in, google for that.
 
N

Neptune Dinosaur

Hey there !!

You'll be happy to know that this is really easy once you know. An "any
workbook" macro like this can be stored in your Personal Workbook - everyone
has one of these by default.

When you record a macro, you get options as to where you want to store it.
The options are in the "Store macro in:" field of the "Record Macro"
dialogue box that comes up whenever you record a macro. Just choose
"Personal Macro Workbook"

If you want to manually write a macro rather than recording one, there are
options there too :
* just record the shell of a macro to the Personal Macro Workbook and then
scribble away within the code shell, OR
* go to the VB Editor Project window and work directly in modules attached
to the Personal Workbook.

If you are running procedures that live in the Personal Workbook, you'll
need to be careful that the code is correctly referring to the workbook in
which the code should be executed (otherwise, of course, the code will try to
execute on the Personal Workbook). These references may need to be generic.

To see the actual Personal Workbook (i.e. the sheets rather than the code),
Go to the Window menu in Excel and select "Unhide". The Personal Book will
appear as an option.
 

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