Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default how to protect a sheet

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.



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default how to protect a sheet

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.





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default how to protect a sheet

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.






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default how to protect a sheet

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.








  #5   Report Post  
Posted to microsoft.public.excel.programming
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.









Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Protect Sheet MFS Excel Discussion (Misc queries) 1 September 18th 09 08:18 PM
Un protect sheet venumadhav g[_2_] Excel Worksheet Functions 2 August 26th 08 01:23 PM
Protect Workbook Vs Protect Sheet Poor_pakistani New Users to Excel 4 May 25th 06 02:06 PM
Can I protect columns w/in a "List" using Protect Sheet? Diane Excel Discussion (Misc queries) 0 May 10th 06 03:30 PM
help with protect sheet WYN Excel Discussion (Misc queries) 14 February 18th 05 10:26 PM


All times are GMT +1. The time now is 09:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"