I need to ENABLE COM addins through VBA. The addins already exists under COM addin's, but get unchecked when my excel crash. Can you please help me with this:
Sub hyp()
Dim objAddIn As Object
For i = 1 To Application.COMAddIns.Count
Set objAddIn = Application.COMAddIns.Item(i)
On Error Resume Next
If Application.COMAddIns.Item(i).Description = "Oracle Smart View for Office" Then
'MsgBox Application.COMAddIns.Item(i).Description
'NEED TO ENABLE THE COM ADDIN
Else
End If
Next i
End Sub
A simpler alternative to the answer of Excel Developers that worked for me is to index the com add in directly by its string name instead of looping through the com add ins using an integer index and comparing to the description. In particular, this code worked for me (I've included a connect and disconnect version):