Dim ArrLib, iArr: ArrLib = Array("C:\Windows\system32\vbscript.dll\3", "C:\Windows\system32\scrrun.dll", "C:\PROGRA~1\COMMON~1\MICROS~1\VBA\VBA7.1\VBE7.DLL", "C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE", "C:\Windows\system32\FM20.DLL", "C:\Program Files\Common Files\Microsoft Shared\OFFICE16\MSO.DLL", "C:\Windows\System32\msxml6.dll", "C:\Windows\System32\msxml3.dll", "C:\Program Files\Common Files\System\ado\msado15.dll", "C:\Windows\System32\stdole2.tlb", "C:\Program Files (x86)\Common Files\Microsoft Shared\VBA\VBA6\VBE6EXT.OLB", "C:\Windows\System32\mshtml.tlb", "C:\Windows\System32\ieframe.dll", "C:\Windows\System32\winhttpcom.dll", Environ$("USERPROFILE") & "\AppData\Local\SeleniumBasic\Selenium64.tlb", "C:\WINDOWS\SysWow64\MSWINSCK.OCX", "C:\Program Files\Microsoft Office\root\Office16\MSWORD.OLB", "C:\Windows\SysWOW64\msscript.ocx")
On Error Resume Next
With ActiveWorkbook.VBProject.References
Dim FileDP$: FileDP$ = Application.StartupPath & "\" & Application.ThisWorkbook.Name
'If AddIns(FileDP).Installed Then .AddFromFile FileDP
'For Each iArr In ArrLib: .AddFromFile (iArr): Next
' .AddFromGuid "{000204EF-0000-0000-C000-000000000046}", Major:=4, Minor:=2 'VBA
' .AddFromGuid "{00020813-0000-0000-C000-000000000046}", Major:=1, Minor:=9 'Excel
' .AddFromGuid "{0D452EE1-E08F-101A-852E-02608C4D0BB4}", Major:=2, Minor:=0 'MSForms
' .AddFromGuid "{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}", Major:=2, Minor:=8 'Office
' .AddFromGuid "{F5078F18-C551-11D3-89B9-0000F81FE221}", Major:=6, Minor:=0 'MSXML2
' .AddFromGuid "{B691E011-1797-432E-907A-4D8C69339129}", Major:=6, Minor:=1 'ADODB
' .AddFromGuid "{00020430-0000-0000-C000-000000000046}", Major:=2, Minor:=0 'stdole
' .AddFromGuid "{420B2830-E718-11CF-893D-00A0C9054228}", Major:=1, Minor:=0 'Scripting
' .AddFromGuid "{3050F1C5-98B5-11CF-BB82-00AA00BDCE0B}", Major:=4, Minor:=0 'MSHTML
' .AddFromGuid "{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}", Major:=1, Minor:=1 'SHDocVw
' '.AddFromGuid "{0277FC34-FD1B-4616-BB19-A9AABCAF2A70}", Major:=2, Minor:=0 'Selenium
' .AddFromGuid "{248DD890-BB45-11CF-9ABC-0080C7E7B78D}", Major:=1, Minor:=0 'MSWinsockLib
' .AddFromGuid "{00020905-0000-0000-C000-000000000046}", Major:=8, Minor:=7 'Word
' .AddFromGuid "{0E59F1D2-1FBE-11D0-8FF2-00A0D10038BC}", Major:=1, Minor:=0 'MSScriptControl
' .AddFromGuid "{3F4DACA7-160D-11D2-A8E9-00104B365C9F}", Major:=5, Minor:=5 'VBScript_RegExp_55
' .AddFromGuid "{662901FC-6951-4854-9EB2-D9A2570F2B2E}", Major:=5, Minor:=1 'WinHttp
' .AddFromGuid "{0002E157-0000-0000-C000-000000000046}", Major:=5, Minor:=3 'VBIDE
End With
End With