I have a VB6/VBA application that hooks into Excel and loads a workbook. It has been working great for many years. We have now upgraded to Excel 2010 and have ran into some issues. After troubleshooting it seems that if i turn off the PowerPivot COM Add-In the process is able to run as it did before with no issues. While I look for the exact cause of this i wanted to see if i can turn off that Add-In just for my app. I load up Excel like this:
Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = False
On a test Excel workbook I have this code to list the add-ins. However only "Excel Add-Ins" are the only ones that get listed. "COM Add-Ins" do not get listed.
Sub ListAddIns()
Dim CurrAddin As Excel.AddIn
Dim r As Long
Dim ws As Excel.Worksheet
Set ws = ActiveSheet
Cells.Select
Selection.ClearContents
Range("A1").Select
r = 1
For Each CurrAddin In Excel.Application.AddIns
ws.Cells(r, 1).Value = CurrAddin.FullName
ws.Cells(r, 2).Value = CurrAddin.Installed
ws.Cells(r, 3).Value = CurrAddin.Name
ws.Cells(r, 4).Value = CurrAddin.Path
ws.Cells(r, 5).Value = CurrAddin.progID
ws.Cells(r, 6).Value = CurrAddin.CLSID
r = r + 1
Next CurrAddin
MsgBox "Its done.", vbInformation
End Sub
After I find a way to reference the COM Add-In I need to keep it from loading in the Excel object in my app. Any help or suggestions welcome.
Thanks