View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Aragorn[_2_] Aragorn[_2_] is offline
external usenet poster
 
Posts: 3
Default Installing Addin via Automation

I have an addin that I know functions correctly under normal
circumstances. If I manually add the addin via the excel UI, the
application addin installs correctly.

However, if I attempt to install the addin via automation, the
Workbook_AddinInstall method does not seem to run or at least does not
report errors back to the UI. I'm using the following code:

Dim oXL
Dim oAddin
Set oXL = CreateObject("Excel.Application")

oXL.Workbooks.Add
Set oAddin = oXL.AddIns.Add("C:\Program
Files\Company\Product\MacroFiles\Macro.xla")

oAddin.Installed = True

With this code the macro is automatically added in, but the
AddinInstall method clearly never runs or at least errors. For a
correct install I need this method to run. Any thoughts on this would
be greatly appreciated.