Self updating Addin/addon for network use

Captain Sparky

New Member
Joined
Feb 5, 2015
Messages
2
Hello,

I have a .xla addin I've made to control user access to a particular set of documents shared on a network drive. I want to make the .xla check the network drive for a newer version of itself each time excel is opened and if it finds a newer version either copy it over itself, or copy the VBA code into itself.

I don't want to reference all of the users' computers to the network location of the addin so that it will still work on each individual computer in the event that the network goes down, or if someone needs to pull a worksheet down to their laptop and work on it while away from the office.

Currently I have all of the mechanics working of copying the file over to the proper location when needed, and saving it with a new name, since you can't overwrite the addin while it's in use (aka whenever excel is open). I could get around this by having excel activate VBA code in a word document, close all excel sessions, and then have Word complete the file copy, but if I could have it work smoothly in the background without effecting the user I would prefer that.

Any help would be greatly appreciated!
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
If anyone is looking at this thread and has a similar issue, what I ended up doing to solve this was that I installed the add-in on each individual computer, under a common folder directory, and placed a master copy on the shared network drive. The VBA code checks every time that excel is opened up if the version stored on the network drive is newer then the installed version (Comparing a hard coded date in the VBA code itself against the last modified date of the network file). Assuming the network file is newer, the Add-on runs a batch file prompting the user to close all excel windows and press enter, at which point it copies the network file over the local copy. Since they share identical names, excel remains linked to the new file requiring no further user setup.
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,262
Members
452,627
Latest member
KitkatToby

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top