Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I would like to execute some code when a standard menu items is selected
(like 'Protect Sheet'). Is there a way to trap on a menu item? Or, do I essentially need to customize the standard menu item? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi Filibust
You can try this example for 'Protect Sheet' For reset use Mycontrol.OnAction = "" Sub test() Dim Mycontrol As CommandBarControl Set Mycontrol = Application.CommandBars("Worksheet Menu Bar").FindControl _ (ID:=893, Recursive:=True) Mycontrol.OnAction = ThisWorkbook.Name & "!mymacro" End Sub Sub mymacro() MsgBox "Hi" End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "Filibuster" wrote in message ... I would like to execute some code when a standard menu items is selected (like 'Protect Sheet'). Is there a way to trap on a menu item? Or, do I essentially need to customize the standard menu item? |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks, Ron - works just as I need - much appreciated...
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Why is the menu item "Insert - Name" greyed out? | Excel Discussion (Misc queries) | |||
How do I tell Excel to take a selected item and copy it to anothe. | Excel Worksheet Functions | |||
Menu items added with menu item editor in older versions | Excel Discussion (Misc queries) | |||
XML Source Menu Item disabled?? File version?? | Excel Discussion (Misc queries) | |||
How to remove an Excel Main Menu item inserted by .xla file | Excel Discussion (Misc queries) |