ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Restrict copy paste ability (https://www.excelbanter.com/excel-programming/354068-restrict-copy-paste-ability.html)

wana be xl master

Restrict copy paste ability
 
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


Ron de Bruin

Restrict copy paste ability
 
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



--
Regards Ron de Bruin
http://www.rondebruin.nl


"wana be xl master" wrote in message
...
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




Jim Thomlinson[_5_]

Restrict copy paste ability
 
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
--
HTH...

Jim Thomlinson


"wana be xl master" wrote:

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


wana be xl master

Restrict copy paste ability
 
Owesome....Thanks to Ron and Jim
:)

"wana be xl master" wrote:

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



All times are GMT +1. The time now is 05:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com