What is the best way to store macros so that they can be accessed from multiple Excel spreadsheets for multiple users on a network, and yet be maintained at one location?
Create a new sheet with the macros you want to share. Save the sheet as type <Microsoft Excel Add-In (.xla)> to a network folder that everyone has rights to.
On the menu, go to Tools>AddIns. From the list, select the AddIn you just created. If it's not there click browse and locate it. After locating it, make sure it is checked in the <AddIns Available> list.
Now when you need to make a code change, you simply open the .xla file, make changes, and resave it. IIRC, it cant be opened by another user when you attempt to resave it, so you'll have to ask your user's to exit each time you make a change. Jon Hawkins
Does this mean every user will need must go to the Tools menu to select this .xla file as an add-in? Have you had any problems with multiple users accessing the file simultaneously?
Also, if after selecting the AddIn, Excel prompts to "Copy AddIn to default AddIn folder", select No. Or else excel will copy it to your local AddIn folder, and it will be using the local copy ISO the network copy.
Yes, every user will have to select the add-in once. From thereafter, when they open Excel, the add-in should be selected by default.
No problems accessing simultaneously, except when modifications to the code were needed, as I noted above, you'll have to ask them to exit excel. Jon Hawkins
I have an Excel/VBA Intranet on NT4.0
I have a main menu page...like a webpage but it's just a pretty Excel page that is a SHARED WORKBOOK. This main menu has a displayalerts=false autoclose routine because there will be no needed changes to this interface.
Users click any of the CommandButtons on the aformentioned shared menu page and macro's run opening other Shared Workbooks.
Multiple users read only no problem.
Multiple users writing and saving=problem.
Saving changes is a problem if multiple users have the same
workbook open and both make changes.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.