'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
To restore on right click:
Enabled = True
If this posting is helpful please click on the yes button. Thank you
Michael Arch
"armaSANEA" wrote:
> Hello,
>
> I need to find a way to disable certain Excel functions, like the Move or
> Copy sheet action. I would like to ask for some good advice on how to do this.
>
> Also, although I understand this is highly unlikely, but is there any way to
> control the parameters shown in the Move or Copy form? (from Edit --> Move or
> Copy sheet). Is there ay way to remove the item "(new book)" from the "To
> Book" dropdownlist?
>
> If not, perhaps I could disable the dropdownlist altogether? This way moving
> or copying could be done only within the current workbook.
>
>
> Thanks for reading!
>
|