ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to get a macro to work in different workbooks ? (https://www.excelbanter.com/excel-programming/327795-how-get-macro-work-different-workbooks.html)

Susanne

How to get a macro to work in different workbooks ?
 
Hi

How do I get a macro to work in different workbooks without having to copy
it in to every workbook. I have tried to create a button on the toolbar but
it does not work.

Susanne

Paul B

How to get a macro to work in different workbooks ?
 
Susanne, put it in your personal.xls file, this is where you store the
macros that you want to be available for all your workbooks. Have a look
here for more information

http://www.mvps.org/dmcritchie/excel/getstarted.htm
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003


"Susanne" wrote in message
...
Hi

How do I get a macro to work in different workbooks without having to copy
it in to every workbook. I have tried to create a button on the toolbar
but
it does not work.

Susanne




papou

How to get a macro to work in different workbooks ?
 
Hi
Store your macros into a personnal.xls workbook hide its window, save and
place this workbook in the Excel Startup folder.
This will allow your macros to be available each time you open Excel.

HTH
Cordially
Pascal


"Susanne" a écrit dans le message de
...
Hi

How do I get a macro to work in different workbooks without having to copy
it in to every workbook. I have tried to create a button on the toolbar

but
it does not work.

Susanne




Bob Phillips[_6_]

How to get a macro to work in different workbooks ?
 
Show the code that doesn't work.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Susanne" wrote in message
...
Hi

How do I get a macro to work in different workbooks without having to copy
it in to every workbook. I have tried to create a button on the toolbar

but
it does not work.

Susanne




Tom Ogilvy

How to get a macro to work in different workbooks ?
 
You can assign the macro to the button. The macro can be in any workbook.
when the button is pushed, the workbook is opened (if not already open) and
runs the macro. The workbook must be accessible to excel and you should not
move the workbook.

If you didn't assign the macro to the button, then that would be your
problem. Otherwise, it should work (the macro should be in a general module
in the workbook - not a sheet module or the thisworkbook module).

the advantage of using personal.xls is that it is opened when excel is
opened. Also, it is hidden by default.

--
Regards,
Tom Ogilvy

"Susanne" wrote in message
...
Hi

How do I get a macro to work in different workbooks without having to copy
it in to every workbook. I have tried to create a button on the toolbar

but
it does not work.

Susanne





All times are GMT +1. The time now is 04:03 AM.

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