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,