ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Add-In Install (https://www.excelbanter.com/excel-programming/384080-add-install.html)

tjh

Add-In Install
 
How can I install an add-in using vba code.

Thank You,

Jim Thomlinson

Add-In Install
 
The code goes generally like this... check if the addin is installed. If not
add the addin and then install it...

If Not AddIns("Hyperion Essbase OLAP Server DLL").Installed Then
On Error Resume Next
Application.AddIns.Add "C:\Hyperion\Essbase\Bin\essxleqd.xla"
Application.AddIns.Add "C:\Hyperion\Essbase\Bin\essexcln.xll"
AddIns("Hyperion Essbase OLAP Server DLL").Installed = True
On Error GoTo ErrorHandler
End If

--
HTH...

Jim Thomlinson


"tjh" wrote:

How can I install an add-in using vba code.

Thank You,


Chip Pearson

Add-In Install
 
Do you mean to load an add-in that is already known to Excel (listed in the
Add-Is dialog) or to add a new add-in XLA file to Excel's list of add-ins?
Try something like

Sub AAA()
On Error Resume Next
''''''''''''''''''''''''''''''''
' Load Existing Add-In
''''''''''''''''''''''''''''''''
Application.AddIns("Cell Contents Viewer").Installed = True
If Err.Number < 0 Then
''''''''''''''''''''''''''''''''''''''
' Load New Add-In
''''''''''''''''''''''''''''''''''''''''
Application.AddIns.Add Filename:="C:\Path\whatever.xla"
End If
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)

"tjh" wrote in message
...
How can I install an add-in using vba code.

Thank You,




tjh

Add-In Install
 
I would like to install the add-in from a specific file directory, no matter
if it currently installed or not. Allowing my users to acquire the Add-in
initially, or update the Add-In when changes/updates are made. Essentially, I
do not want them to know where the add-in is coming from, but to have it
installed and up to date on their computer. My thoughts are to simply have a
button in excel to install/refresh the add-in.

Thanks,



"Chip Pearson" wrote:

Do you mean to load an add-in that is already known to Excel (listed in the
Add-Is dialog) or to add a new add-in XLA file to Excel's list of add-ins?
Try something like

Sub AAA()
On Error Resume Next
''''''''''''''''''''''''''''''''
' Load Existing Add-In
''''''''''''''''''''''''''''''''
Application.AddIns("Cell Contents Viewer").Installed = True
If Err.Number < 0 Then
''''''''''''''''''''''''''''''''''''''
' Load New Add-In
''''''''''''''''''''''''''''''''''''''''
Application.AddIns.Add Filename:="C:\Path\whatever.xla"
End If
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)

"tjh" wrote in message
...
How can I install an add-in using vba code.

Thank You,






All times are GMT +1. The time now is 09:08 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com