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).Delete
'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, Before:=13
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.