View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
youngman youngman is offline
external usenet poster
 
Posts: 24
Default how to protect a sheet

thank you very much.
1. That is the way it works.

is there any merit in this point. in ordinary feeling,whenever we save a
file ,we can restore all property we want to have.

2. Protection itself is persistent. If all cells are locked and you
protect the sheet, the user will not be able to enter any changes. It is
the enableselection property that is not persistent.


once you run the macro you do protect the sheet,but when someone reads the
file in,it is simple to disable the macro.
anything wrong with my thinking.
regards

---------------------------------
"Tom Ogilvy" wrote in message
...
1. That is the way it works

2. Protection itself is persistent. If all cells are locked and you
protect the sheet, the user will not be able to enter any changes. It is
the enableselection property that is not persistent.

If you don't want to use it, that is certainly your choice.

--
Regards,
Tom Ogilvy

"youngman" wrote in message
...
thanks for your answer.
1."The EnableSelection property has to be set each time the workbook is
opened as it does not persist across the closing and opening of a

workbook".
but why. is it a problem,or it is set to be so.
2.i don't want to protect my sheet with a macro,for it can be disable

easily
when the file is opened.

thank you.




"Tom Ogilvy" wrote in message
...
Activesheet.Protect Password:="ABCD:
ActiveSheet.EnableSelection = xlNoSelection

The EnableSelection property has to be set each time the workbook is

opened
as it does not persist across the closing and opening of a workbook.

You
might set it in the workbook_Open event or worksheet_Activate event or

both.

--
Regards,
Tom Ogilvy

"youngman" wrote in message
...
hi,
i d like to protect my sheets.
i know there are many methods to do it,but i just want to do by

setting

the property of the sheet to be -4142-xlnoselection.

but it comes to be of no result.

what is the problem.

thank you.