Restrict copy paste ability

G

Guest

I have a protect sheet with only few cells where users can enter data.

Is there anyway to restrict users not to do a copy paste in those areas?

Any help greatly appreciated.

Thanks
 
R

Ron de Bruin

Hi

With code you can use this event in the Thisworkbook module

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
Application.CutCopyMode = False
End Sub

You must also disable drag and drop
 
G

Guest

Here is some selection change code that you need to put into the specified
sheet...
(Right click the sheet tab and select Veiw Code)

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
with Application
If .CutCopyMode = xlCopy Then .CutCopyMode = False
If .CutCopyMode = xlCut Then .CutCopyMode = False 'Prevents Cut
end with
End Sub
 

Ask a Question

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.

Ask a Question

Top