share a macro with others


Posted by Elizabeth B on November 26, 2001 8:20 AM

I have a fairly simple, although lengthy macro in my personal workbook that many people in my dept find useful. Short of going around and re-recording it on each of their computers, is there a way to send it or copy it to their machine? Also, now I have been asked to set this macro up at another shop that I only have e-mail access to- they are on a different server than me. I looked at exporting it from VB, but I just ended up with a copy of it. I'd like to be able to install it on someone else's pc from my desk. I'm guessing you've probably answered this before, but I couldn't find it- Thanks for your help (again)

Posted by Glenn on November 26, 2001 9:42 AM


Unless all the recipient users are experienced users who could copy a text e-mail of the VBA macro into a module in their own personal.xls, the simplest way that comes to mind is to convert that macro into an addin (File\Save As|Microsoft Excel Addin (*.xla). Then e-mail them the Addin and Although the procedure is not directly accessible to the user as it is in a normal workbook, you can access use direct methods such as giving it a shortcut key when you create it which the user can use to activate it, or you could include a toolbar or menu option in the nmacro which they would have access to. Further, if they know the name of the procedure in the addin they can enter it directly into the Macros dialogue box and click run to execute it.
After you create the addin, e-mail it to them and have them save it somewhere appropriate such as the Excell subdirectory. Then they need to load it by going to Tools\Addins\ and then selecting it from the list. If it is not shown on the list, click browse and find the XLA file - then it will be on the list.

Posted by Glenn on November 26, 2001 9:46 AM

Unless all the recipient users are experienced users who could copy a text e-mail of the VBA macro into a module in their own personal.xls, the simplest way that comes to mind is to convert that macro into an addin (File\Save As\Microsoft Excel Addin (*.xla). Then e-mail them the Addin and although the procedure is not directly accessible to the user as it is in a normal workbook, you can access using direct methods such as giving it a shortcut key when you create it which the user can use to activate it, or you could include a toolbar or menu option in the macro which they would have access to. Further, if they know the name of the procedure in the addin they can enter it directly into the Macros dialogue box and click run to execute it.
After you create the addin, e-mail it to them and have them save it somewhere appropriate such as the Excel subdirectory. Then they need to load it by going to Tools\Addins\ and then selecting it from the list. If it is not shown on the list, click browse and find the XLA file - then it will be on the list.

Posted by elizabeth b on November 26, 2001 10:12 AM

Thanks Glen. They are not experienced users at all, in fact, most don't even use the most basic autsum functions to add cells up. So the simplest way to get them the macro, the better.
Question for you: How do I get the 'save as' function to appear? I opened the macro in VBA but I don't get save as as an option. Should I do another step first? I'll let you know how your suggestion works once I can save the darn thing as an .xla.

Posted by Elizabeth B on November 26, 2001 10:59 AM

I'm trying but no luck/SOS/receiving bad error messages

Glenn: Here's what I've been doing:
Opened macro in VBA. Exported file. Selected 'save as', to C:\program files\microsoft offic\office\library.
clicked send to, sent to a likely candidate nearby.
Opened e-mail, selected 'save to disk' when prompted, then saved to the other person's C:\program files\microsoft offic\office\library.
Went to Excel. Opened book 1, clicked tools, selected 'add ins'. not showing on list, so did browse. Found file, received big red X error: "macro24 is not a valid add-in". Ideas?
Thanks again for your help and insight. EB




Posted by Ivan F Moala on November 27, 2001 1:12 AM

Re: I'm trying but no luck/SOS/receiving bad error messages

You have probably exported the module.
You just need to save the file as an addin;
Goto file | saveas | select addin

Ivan