ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   unknown menu appear when installing an AddIn (https://www.excelbanter.com/excel-programming/286097-unknown-menu-appear-when-installing-addin.html)

carl

unknown menu appear when installing an AddIn
 
hi,
we have created an Excel AddIn and installed this AddIn
with a macro.This AddIn as a build in menu attach to 1
workbook. No menu is created dynamically. But sometime
after installation in the AddIn Bar a other menu appear
Open, New close ...., where that come from???
I even unload and uninstalled any previous AddIn with the
same name.
Can any one help me?

This is the code.

Set ExcelApp = CreateObject("Excel.Application")
ExcelApp.DisplayAlerts = False
'ExcelApp.Visible = True
Set xlBook = ExcelApp.Workbooks.Add

For Each ad In ExcelApp.AddIns
'Unload MyaddIn
If ad.Name = OLD_ADDIN_NAME &ADDIN_FILE_EXTENTION Or
ad.Name = NEW_ADDIN_NAME & ADDIN_FILE_EXTENTION Then
ad.Installed = False
End If
Next ad

'Delete menu bar
For Each ComBar In ExcelApp.CommandBars
If ComBar.Name = OLD_BAR Or ComBar.Name = NEW_BAR Then
ComBar.Delete
End If
Next ComBar

AddinName = REP_DESTINATION_ADDIN & NEW_ADDIN_NAME &
ADDIN_FILE_EXTENTION

ExcelApp.AddIns.Add FileName:=AddinName 'Add in the AddIn
list
ExcelApp.AddIns(NEW_ADDIN_NAME).Installed = True 'Install
the addin

xlBook.Close 'Close workbook

ExcelApp.Quit 'close Excel application
Set ExcelApp = Nothing
Set ad = Nothing
Set ComBar = Nothing



All times are GMT +1. The time now is 09:31 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com