Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Turn off menu function
Anyone know the code to turn off a certain menu function, say "cut", under
the edit menu in a particular worksheet? Thanks, IP |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Turn off menu function
In order to remove a command from the Menu, you need to now the control ID
For Example: 'This command will remove not really delete the Move or copy sheet from the edit bar ThisWorkbook.CommandBars("Edit").Controls(13).Dele te 'This command will disable the right click version of moving or copying the sheet Set modfctrl = CommandBars(35).FindControl(ID:=848) With modfctrl If .ID = 848 Then .Enabled = False End If End With To Restore into main edit bar do this: Application.CommandBars("Edit").Controls.Add Type:=msoControlButton, ID:= _ 848, Befo=13 To restore on right click: Enabled = True -- If this posting was helpful, please click on the Yes button. Regards, Michael Arch. "iperlovsky" wrote: Anyone know the code to turn off a certain menu function, say "cut", under the edit menu in a particular worksheet? Thanks, IP |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Turn off menu function
Here is the link to the Control ID's
http://support.microsoft.com/default.aspx/kb/213552 -- If this posting was helpful, please click on the Yes button. Regards, Michael Arch. "Michael" wrote: In order to remove a command from the Menu, you need to now the control ID For Example: 'This command will remove not really delete the Move or copy sheet from the edit bar ThisWorkbook.CommandBars("Edit").Controls(13).Dele te 'This command will disable the right click version of moving or copying the sheet Set modfctrl = CommandBars(35).FindControl(ID:=848) With modfctrl If .ID = 848 Then .Enabled = False End If End With To Restore into main edit bar do this: Application.CommandBars("Edit").Controls.Add Type:=msoControlButton, ID:= _ 848, Befo=13 To restore on right click: Enabled = True -- If this posting was helpful, please click on the Yes button. Regards, Michael Arch. "iperlovsky" wrote: Anyone know the code to turn off a certain menu function, say "cut", under the edit menu in a particular worksheet? Thanks, IP |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
turn on right click menu in excel 2003 | Excel Worksheet Functions | |||
how do i turn on the tab over function | Excel Discussion (Misc queries) | |||
How to turn a spreadsheet into a function? | Excel Worksheet Functions | |||
Does anyone know how to turn off the GetPivotData function? | Excel Worksheet Functions | |||
Turn off menu options with vba | Excel Programming |