Thread: Deleting Menu
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ravi Ravi is offline
external usenet poster
 
Posts: 63
Default Deleting Menu

Hello:

I added a new custom menu

using the follwing the code

Sub CreateMenu()
Dim DataMenu As CommandBarPopup
Dim NewMenuItem As CommandBarButton


Set DataMenu = CommandBars(1).FindControl(ID:=30011)

Set NewMenuItem = DataMenu.Controls.Add _
(Type:=msoControlButton)
With NewMenuItem
.Caption = "&eeprom"
.OnAction = "emc"
.BeginGroup = True
End With

End Sub

Sub emc()
UserFormEMC.Show
End Sub

This works and added a menu eeprom in main menu data.

I am not able to delete the menu eeprom ? How do I do that?

Thanks in advance

Ravi