Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Popup Menu
I want to Add my own menu within the popup menu of the excel.
so that user can choose the functionality which I have provide by righ clicking any cell of the sheet. Any One can help me................ -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Popup Menu
Fuzzy,
Here is an example Sub addRightClick() Dim oCtl As Office.CommandBarControl With Application.CommandBars("cell") On Error Resume Next .Controls("myFunction").Delete On Error GoTo 0 .Controls("Insert Comment").Visible = False Set oCtl = .Controls.Add(temporary:=True) With oCtl .BeginGroup = True .Caption = "myFunction" .OnAction = "myMacro" End With End With End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "FuzzyLogic " wrote in message ... I want to Add my own menu within the popup menu of the excel. so that user can choose the functionality which I have provide by right clicking any cell of the sheet. Any One can help me................. --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Popup Menu
http://support.microsoft.com/default...b;en-us;166755
File Title: Customizing Menu Bars, Menus, and Menu Items in Microsoft(R) Excel 97 File Name: WE1183.EXE File Size: 58041 bytes File Date: 06/20/97 Keywords: kbfile kbappnote Description: This Application Note can help you learn techniques for writing Visual Basic(R) for Applications code to customize menus in Microsoft Excel 97. This Application Note contains code examples that you can use with the following elements: menu bars, menus, menu items, submenus, and shortcut menus. http://support.microsoft.com/?id=213209 XL2000: Sample Macros that Customize and Control Shortcut Menus http://support.microsoft.com/?id=162878 XL97: Sample Macros That Customize and Control Shortcut Menus Previous post by Andy Wiggins: This file might be a help: http://www.bygsoftware.com/examples/...UpMenuDemo.zip It's in the "Menu Routines" section on page: http://www.bygsoftware.com/examples/examples.htm Demonstrates how to create and implement a popup menu. The workbook covers two areas: * Creating a popup menu * Using the Right_Click event The code is open and commented. -- Regards Andy Wiggins www.BygSoftware.com Home of "Save and BackUp", "The Excel Auditor" and "Byg Tools for VBA" ----- Previous Post by Ron de Bruin If you mean the menu if you right click on a cell then try this Sub AddToCellDropDown() Dim CellDropDown As CommandBar Dim MyDropDownItem As CommandBarControl RemoveFromCellDropDown Set CellDropDown = Application.CommandBars("Cell") With CellDropDown.Controls.Add(Type:=msoControlButton, befo=1) .Caption = "Try me" .Style = msoButtonIconAndCaption .FaceId = 59 .OnAction = ThisWorkbook.Name & "!Your_macro" .Tag = "MyDropDownItem" End With End Sub Sub RemoveFromCellDropDown() Dim MyDropDownItem As CommandBarControl Set MyDropDownItem = Application.CommandBars.FindControl(Tag:="MyDropDo wnItem") If Not MyDropDownItem Is Nothing Then MyDropDownItem.Delete End If Set MyDropDownItem = Nothing End Sub Sub Your_macro() MsgBox "Hi there." End Sub -- Regards Ron de Bruin (Win XP Pro SP-1 XL2002 SP-2) www.rondebruin.nl -- Regards, Tom Ogilvy "FuzzyLogic " wrote in message ... I want to Add my own menu within the popup menu of the excel. so that user can choose the functionality which I have provide by right clicking any cell of the sheet. Any One can help me................. --- Message posted from http://www.ExcelForum.com/ |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Popup Menu
Extremely Thanx to Bob,
I works now. Can please tell me about my previous post. Installing AddIns through VB Application. Regards. Fuzz -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Popup Menu / Shortcut Menu | Excel Discussion (Misc queries) | |||
Non-functional Popup Menu Boxes | Charts and Charting in Excel | |||
I N D E X menu via Tabs Popup | Excel Programming | |||
add combo box at popup menu | Excel Programming | |||
Modifying the right-click popup menu of a shape | Excel Programming |