I need to enable COM addins through VBA. The addins already exists under COM addins, but become unchecked when Excel crashes.
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
Public Sub Connect_COM_AddIn(Name As String)
Dim ndx As Integer
For ndx = 1 To Application.COMAddIns.Count
If Application.COMAddIns(ndx).Description = Name Then
Application.COMAddIns(ndx).Connect = True
Exit For
End If
Next
End Sub