Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On 18 Jun, 11:59, Peter wrote:
Dear all brains, I have already written an add-in that creates a menu called "Zenos" however I am having some serious trouble adding menu items to that menu by another add-in. This is the code, if anyone has any ideas please let me know: Dim tns As Object Set tns = CommandBars("Worksheet Menu Bar").Controls("Zenos") With tns .Controls.Add(Type:=msoControlButton).Caption = "Daily Payments Monitoring" .Controls("Daily Payments Monitoring").OnAction = "TNS_report" End With Thanks, Peter Don't worry trying to work this out, here is the answer: Sub menuItem_Create() With CommandBars("Worksheet menu bar").Controls("Zenos") .Controls.Add(Type:=msoControlButton).Caption = "Peter" .Controls("Peter").OnAction = "peter" .Controls("Peter").FaceId = 285 End With End Sub Sub peter() MsgBox "Peter" End Sub Sub delete_peter() Dim myCmd As Object Set myCmd = CommandBars("Worksheet menu bar").Controls("Zenos") myCmd.Controls("Peter").Delete End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Drop dwn menu. Formula to count selection frm menu in anoth cell? | Excel Worksheet Functions | |||
filter dropdown menu so 2nd drop menu is customized | Excel Worksheet Functions | |||
Create Dropdown menu without using the Validation on the Data Menu | Excel Worksheet Functions | |||
Menu items added with menu item editor in older versions | Excel Discussion (Misc queries) | |||
Adding a menu item right click menu when clicking on a single. | Excel Programming |