Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Excel 2003
How do I add items to the context menu that appears when I right click. I would like to add items that will run a vba function just as I can with keystrokes using the Application.Onkey function. Thank you, Fred Jacobowitz |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
That commandbar is called "Cell".
I saved this from a previous post: This kind of thing might help: Option Explicit Sub auto_open() With Application.CommandBars("cell") On Error Resume Next .Controls("DumpToFile").Delete On Error GoTo 0 With .Controls.Add(Type:=msoControlButton, temporary:=True) .BeginGroup = True .Caption = "DumpToFile" .OnAction = "'" & ThisWorkbook.Name & "'!yourmacronamehere" End With End With End Sub Sub auto_close() With Application.CommandBars("cell") On Error Resume Next .Controls("DumpToFile").Delete On Error GoTo 0 End With End Sub Sub yourmacronamehere() MsgBox "hi from your macro!" End Sub Fred Jacobowitz wrote: Excel 2003 How do I add items to the context menu that appears when I right click. I would like to add items that will run a vba function just as I can with keystrokes using the Application.Onkey function. Thank you, Fred Jacobowitz -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Missing menu items | Setting up and Configuration of Excel | |||
Remove Excel Menu Items | New Users to Excel | |||
greyed out menu items | Excel Worksheet Functions | |||
Enabling sub menu items via vba | Excel Worksheet Functions | |||
Menu items added with menu item editor in older versions | Excel Discussion (Misc queries) |