Archive of Mr Excel Message Board


Back to Excel VBA archive index
Back to archive home



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)

Check out our Excel VBA Resources

Re: share a macro with others

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.


Re: share a macro with others

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.


Re: share a macro with others

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.


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

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

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



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

Posted by Ivan F Moala on November 27, 2001 1:12 AM
You have probably exported the module.
You just need to save the file as an addin;
Goto file | saveas | select addin

Ivan





This archive is from the original message board at www.MrExcel.com.
All contents © 1998-2004 MrExcel.com.
Visit our online store to buy searchable CD's with thousands of VBA and Excel answers.
Microsoft Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.