I have an Add-In I created that is used by several users on a network. I upload new versions from time to time and place in a common folder. I want the users to be constantly using the latest version of the Add-In (to avoid users using an outdated version and reporting errors that is fixed in a current version).
Most of the users do not remember/care about updating to the latest version on a regular basis. So I am looking at altering the Add-In so that it will:
- check if the shared network folder path can be found at Workbook_Open (in case anything happens to the network folder path)
- determine if there is a new version in this folder (the versions are determined by a numeric string on the end of the file name. e.g. FILENAME_build20130217.XLAM)
- copy the new version to the users Add-In folder (I prefer the Add-Ins to be loaded from the users own folders rather than the network path)
- load the new Add-In from the users Add-In folder
This is what I have so far in ThisWorkbook:
Further notes:![]()
Please Login or Register to view this content.
CheckFileNameContainsHigherVersionNumber = I am thinking that it may be possible to make use of code from AddLoaderV2 (see attached zip). In the Module 'AddLoadModule' there is a sub 'AddLoader2'. Part of this code examines a folder for files and it will select a single candidate which it decides has the highest version file name. (I am unsure if I have the skill to work this into my current code.)
One potential annoyance I want to avoid is this: When the currently loaded Add-In checks the shared network folder, I don't want it to copy & install the XLAM if it is already the same version as the currently loaded Add-In. (Possibly by checking if ThisWorkbook.Name = the selected candidate file from the CheckFileNameContainsHigherVersionNumber?)
Bookmarks