pulsar777
05-21-2018, 08:04 AM
Hi, I have a corporate addin file named test.xlam (on purpose) that when installed,
a custom Ribbon tab will be displayed.
However when I have it as vba syntax in ThisWorkbook module, event Workbook_Open,
it not only displays the tab on ribbon, nor it appears in project explorer:
Private Sub Workbook_Open()
Dim addinPath As String
Dim xlAddin As Excel.AddIn
addinPath = Application.UserLibraryPath & "test.xlam"
With Application
With .AddIns
Set xlAddin = .Add(addinPath)
xlAddin.Installed = True
'Me.Activate
End With
End With
End Sub
To get it shown, I have to manually browse and physically add it again:
22292
22293
Thank you for any advice !
a custom Ribbon tab will be displayed.
However when I have it as vba syntax in ThisWorkbook module, event Workbook_Open,
it not only displays the tab on ribbon, nor it appears in project explorer:
Private Sub Workbook_Open()
Dim addinPath As String
Dim xlAddin As Excel.AddIn
addinPath = Application.UserLibraryPath & "test.xlam"
With Application
With .AddIns
Set xlAddin = .Add(addinPath)
xlAddin.Installed = True
'Me.Activate
End With
End With
End Sub
To get it shown, I have to manually browse and physically add it again:
22292
22293
Thank you for any advice !