Hello @Niklas There are a few methods you can use to install an Excel AddIn for all users on a PC:
- Registry Modification: Excel normally loads add-ins based on per user. You can build a VB script that checks how many
OPEN
keys you have for each user in the registry (users may already have an xla loading at startup). Then, add anOPEN
value (REG_SZ) with the path to the xla file. - Modify ntuser.dat file: You can import the
ntuser.dat
file fromc:\users\default
and name it something. Then modify the keyHKEY_USERS\SOMETHING\software\Microsoft\Office\16.0\Excel\Options
and make the add-in start for any new user of the machine. - Copy Add-in to XLSTART folder: You can copy the Add-in to the
XLSTART
folder. On Excel 2013 on Windows 64-bit systems, that ends up atC:\Program Files (x86)\Microsoft Office\Office15\XLSTART
. On Excel 2016, it’sC:\Program Files\Microsoft Office\Office16\XLSTART
. Then when any user starts Excel, an extra menu item shows up top “Add-ins” and your add-in can be accessed from there. - Automation: Without modifying the registry manually, you can try the following code for every user to install an Excel add-in with automation:
Dim oXL As Object, oAddin As Object
Set oXL = CreateObject("Excel.Application")
oXL.Workbooks.Add
Set oAddin = oXL.AddIns.Add("C:test.xla", True)
oAddin.Installed = True
oXL.Quit
Set oXL = Nothing
Please note that these methods may require administrative privileges. Always remember to backup your registry before making any changes. It’s also important to note that these methods might not work with all versions of Excel or Windows, so testing in your specific environment is crucial. I hope this answers your question?