Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub DeleteIt()
Dim DataMenu As CommandBarPopup Set DataMenu = CommandBars(1).FindControl(ID:=30011) On Error Resume Next DataMenu.Controls("&eeprom").Delete End Sub -- Jim "ravi" wrote in message ... | 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 | | |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Also good info here
http://support.microsoft.com/default...02&Product=xlw How to customize menus and menu bars in Excel http://www.j-walk.com/ss/excel/tips/tip53.htm Creating Custom Menus (John Walkenbach) TIP http://www.erlandsendata.no/english/...oadcommandbars Ole P. Erlandsen's Web Site (Example workbooks) -- Regards Ron de Bruin http://www.rondebruin.nl "Jim Rech" wrote in message ... Sub DeleteIt() Dim DataMenu As CommandBarPopup Set DataMenu = CommandBars(1).FindControl(ID:=30011) On Error Resume Next DataMenu.Controls("&eeprom").Delete End Sub -- Jim "ravi" wrote in message ... | 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 | | |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Deleting Headers and Footers that are in the drop down Menu? | Excel Discussion (Misc queries) | |||
Deleting an otpion on the drop down menu on a pivot table | Excel Discussion (Misc queries) | |||
How do I get Goal Seek back after deleting it from the Tools menu. | Excel Discussion (Misc queries) | |||
Deleting a Menu Bar | Excel Programming | |||
Problems deleting custom menu = double entries | Excel Programming |