PDA

View Full Version : Help needed to macro macro global



clhare
10-19-2010, 06:38 AM
I have an Excel macro that I need to make global. I don't want to put it in my Personal.xls file, as I need to share this macro with a number of other people.

In my Excel file where the macro resides, I have added a toolbar to make it easy to run the macro. What do I need to do to make this macro and toolbar accessible to the other users?

Tinbendr
10-20-2010, 08:57 AM
I would:
1. Create a module of the code you want to share.
2. Programmically add the menu when opened and removed when closed to the module.
3. Export module.
4. Send the exported file to others with instructions on how to import module.

David

p45cal
10-20-2010, 10:04 AM
Check out making an Add-in.

mdmackillop
10-20-2010, 01:43 PM
For add-ins see here (http://vbaexpress.com/forum/showthread.php?t=10855)

clhare
10-22-2010, 03:44 AM
Thank you for your suggestions. I tried doing an Add-In, but had difficulty making the macro available to other users when they copied the .xla file to their PC.

I ended up saving the .xls file to the "C:\Documents and Settings\<my name-na>\Application Data\Microsoft\Excel\XLSTART" folder. Then I had to open the file, add a short-cut to my macro, hide the file in Excel, and close it. For each user I had to have them open it in Excel and hide it. Then all were able to user the macro shortcut I had created.

I also tried adding the macro programmatically to the menu bar or a toolbar, but was unable to figure out how to get that to work. If there are any suggestions on that, I would appreciate it.

Thanks!

mdmackillop
10-22-2010, 05:02 AM
If you can get the Add-in on your server, tell your users not to copy to their PCs. Then if you need to update your code, you need only change the Server version.