D
Dennis
I have an Add-In xla that has created a menu Item on the Tools Menu with the
following code in the xla project.
Private Sub Workbook_Open()
.......
Set NewItem = Application.CommandBars(1) _
.Controls("tools").Controls.Add
NewItem.Caption = MenuItemName
NewItem.OnAction = MenuItemMacro
NewItem.BeginGroup = True
.....
end sub
If the Add-In is subsequently unchecked in Tools->Add-Ins
How do I delete the menu Item from the Tools Menu? Just unchecking just left
the menu item on the tools menu creating an error when clicked.
If Tried
Private Sub Workbook_Close()
Application.CommandBars(1) _
.Controls("Tools").Controls(MenuItemName).Delete
End Sub
but this didn't work.
following code in the xla project.
Private Sub Workbook_Open()
.......
Set NewItem = Application.CommandBars(1) _
.Controls("tools").Controls.Add
NewItem.Caption = MenuItemName
NewItem.OnAction = MenuItemMacro
NewItem.BeginGroup = True
.....
end sub
If the Add-In is subsequently unchecked in Tools->Add-Ins
How do I delete the menu Item from the Tools Menu? Just unchecking just left
the menu item on the tools menu creating an error when clicked.
If Tried
Private Sub Workbook_Close()
Application.CommandBars(1) _
.Controls("Tools").Controls(MenuItemName).Delete
End Sub
but this didn't work.