Sharing Macros in Excel

  • Thread starter Thread starter Jenny
  • Start date Start date
J

Jenny

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?
 
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 Tools>Add-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
(e-mail address removed)
 
Back
Top