ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   preventing copying (https://www.excelbanter.com/excel-discussion-misc-queries/90241-preventing-copying.html)

mattguerilla

preventing copying
 
Hi,

How do I prevent someone copying data from cells in excel? I am using excel
2000.

regards,

Matt

Arvi Laanemets

preventing copying
 
Hi

Only leaving all cells empty :-))


--
Arvi Laanemets
( My real mail address: arvi.laanemets<attarkon.ee )



"mattguerilla" wrote in message
...
Hi,

How do I prevent someone copying data from cells in excel? I am using
excel
2000.

regards,

Matt




Ardus Petus

preventing copying
 
Paste the following in ThisWorkbook code:

HTH
--
AP

'-----------------------
Private Sub Workbook_Open()
setCutCopy False
End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)
setCutCopy True
End Sub


Sub setCutCopy(bSet As Boolean)
Const iIdCopy = 19
Const iIdCut = 21
CommandBars("Standard").FindControl(ID:=iIdCopy).V isible = bSet
CommandBars("Edit").FindControl(ID:=iIdCopy).Visib le = bSet
CommandBars("Cell").FindControl(ID:=iIdCopy).Visib le = bSet

CommandBars("Standard").FindControl(ID:=iIdCut).Vi sible = bSet
CommandBars("Edit").FindControl(ID:=iIdCut).Visibl e = bSet
CommandBars("Cell").FindControl(ID:=iIdCut).Visibl e = bSet

If bSet Then
Application.OnKey "^c"
Application.OnKey "^x"
Else
Application.OnKey "^c", ""
Application.OnKey "^x", ""
End If
End Sub
'----------------------------
"mattguerilla" a écrit dans le
message de news: ...
Hi,

How do I prevent someone copying data from cells in excel? I am using
excel
2000.

regards,

Matt




Dave Peterson

preventing copying
 
Just to add to Arvi's response.

Excel's security isn't made for this kind of protection.

You could try implementing the code that Ardus supplied, but if the user
disables macros or even resets his toolbar, then your data can be copied.



mattguerilla wrote:

Hi,

How do I prevent someone copying data from cells in excel? I am using excel
2000.

regards,

Matt


--

Dave Peterson


All times are GMT +1. The time now is 07:21 PM.

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