OK, the next step is to check that you have simplified the situation as much as possible:
· Make sure Excel does not load any add-ins automatically at startup. This is one difference between the normal start and starting through automation.
· Make a single test workbook that registers the .xll, and has a VBA Sub that tests the COM interop.
· Start Excel directly, load the workbook, run the test Sub (maybe it makes the COM call and writes something to the sheet).
· Now start Excel from automation (maybe something like the powershell below), open the workbook and run the test Sub.
PS C:\> $app = New-Object -comobject Excel.Application
PS C:\> $wb = $app.Workbooks.Open("c:\Temp\TestCom.xlsm")
PS C:\> $wb.Name
TestCom.xlsm
PS C:\> $app.Run("DoTest")
PS C:\> $app.Range("A1").Value()
Worked!
PS C:\> $app.Quit()
-Govert
--
You received this message because you are subscribed to the Google Groups "Excel-DNA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
exceldna+u...@googlegroups.com.
To post to this group, send email to exce...@googlegroups.com.
Visit this group at https://groups.google.com/group/exceldna.
For more options, visit https://groups.google.com/d/optout.
--