Data Protection from being copied

  • Thread starter Thread starter Murtaza
  • Start date Start date
M

Murtaza

Dear Expert:

How can i protect my data from being copied i.e. xlnoSelection. I have
changed the property 'EnableSelection'=xlNoSelection' but it only works
while workbook is open.

If I close the workbook & re-open it, it again open with 'xlNoRestrictions'.

I only need that user can only read the data, user Can't Print, Cant Select,
Can't Copy the data.

Is it possible without running any macro b/c user can disable the macro.

Please help
 
This is a setting that excel forgets after you close the workbook.

So each time the workbook is opened, you have to reset it.

Option Explicit
Sub auto_open()
With Worksheets("sheet1")
.Protect Password:="hi"
.EnableSelection = xlNoSelection
End With
End Sub

would be one way.

But any user who disables macros won't be affected.

A common suggestion is to hide your worksheets and make them visible in the
auto_open (or workbook_open) code.

But even then, this depends on worksheet protection. And excel's protection
features are meant for security--they're meant more to stop typing errors
(locked cells on a protected sheet).

There's code posted here every day that shows how to unprotect a workbook or a
worksheet.

If the data is important and you don't want it out of your control, excel isn't
the tool to use.
 
Back
Top