How do I prevent a worksheet from being copied in excel? Can I disable right
click within a file so that the sheet cannot be copied into another file and
manipulated? I want to give another user acccess to a specificed range in the
worksheet yet prevent them from changing the structure of the worksheet. In
short they should be able to only select values within cells, but should not
be able to compromise the integrity of the worksheet by copying and editing
into a separate worksheet
You can achieve part of what you need to do. Use Tools > Protection >
Protect Sheet to apply the protection. Prior to doing this select the
cells that people are going to be able to edit and hit ctrl + 1. Go to
the protection tab and uncheck the locked box.
You can disable the right click event by inserting this code into the
ThisWorkbook pane of the VBE:
Private Sub Workbook_SheetBeforeRightClick(ByVal Sh As Object, _
ByVal Target As Range, Cancel As Boolean)
Cancel = True
End Sub
However, users will still be able to copy a workbook through the menu
Edit > Move or Copy Sheet (use Tools > Protection > Protect Workbook to
prevent this) and keyboard shortcuts. As such it is very difficult to
stop users from doing a whole range of things, and impossible to
control a worksheet so tightly that a determined person cannot
circumnavigate.
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.