ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Sharing Macros in Excel (https://www.excelbanter.com/excel-programming/285493-sharing-macros-excel.html)

Jenny

Sharing Macros in Excel
 
I am running Excel 2000. I've been able to create a macro
to put the pathname in the footer, and assign that macro
to a toolbar in order to make it available in any
workbook, but as the macro runs, the workbook in which the
macro was originally created is opened, and remains open.

I would like to make the execution cleaner in order to
share the macro with others in my office with a minimum of
confusion about its execution. Is there any way to create
a macro such that it does not require that the original
workbook be opened? Or such that it automatically closes
the workbook that it opened once the macro in question is
executed?

Nick Hodge

Sharing Macros in Excel
 
Jenny

Both are possible, but probably the best way to do this is to save the file
as an add-in and then people can share it via ToolsAdd-Ins.

I'm not sure of your code, but standard policy in code for add-ins will
reference the ThisWorkbook Object rather thanone specifically by name.
Alternatively you may wish to refer in it to the ActiveWorkbook,
ActiveSheet, ActiveCell, etc

Difficult to know without seeing code

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS



Jenny wrote:
I am running Excel 2000. I've been able to create a macro
to put the pathname in the footer, and assign that macro
to a toolbar in order to make it available in any
workbook, but as the macro runs, the workbook in which the
macro was originally created is opened, and remains open.

I would like to make the execution cleaner in order to
share the macro with others in my office with a minimum of
confusion about its execution. Is there any way to create
a macro such that it does not require that the original
workbook be opened? Or such that it automatically closes
the workbook that it opened once the macro in question is
executed?





All times are GMT +1. The time now is 02:13 PM.

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