ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Saving a macro to be available to all workbooks (https://www.excelbanter.com/excel-programming/411948-saving-macro-available-all-workbooks.html)

Matilda

Saving a macro to be available to all workbooks
 
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

DS-NTE

Saving a macro to be available to all workbooks
 
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.

"Matilda" skrev i melding
...
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




Neptune Dinosaur

Saving a macro to be available to all workbooks
 
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.

----
Time is just the thing that keeps everything from happening all at once


"Matilda" wrote:

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


Matilda

Saving a macro to be available to all workbooks
 
Thanks, Guys, got it now!!!

That saves me heaps of time ...

Regards

"Neptune Dinosaur" wrote:

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.

----
Time is just the thing that keeps everything from happening all at once


"Matilda" wrote:

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



All times are GMT +1. The time now is 03:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com