Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sheet protection complications
My workbook contains multiple sheets. After a set time
period, the workbook will automatically run code that will password protect each and EVERY sheet in the workbook. My question is, what happens if a user decides to password protect a sheet with his/her own password before my code automatically tries to do the script above?? It will try to password protect a sheet that has already been password protected by the user, therefore it will fail right?? If this is true, can I prevent users from password protecting their sheets with their own passwords??? thank u |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sheet protection complications
Hi Robert,
Why don't you protect the sheets in the workbook open event, but set the Userinterfaceonly property to true which will allow your code to run? You can then used the cells' locked property to lock and unlock various cells or ranges. Alternatively if you have a Excel 2003 or earlier you could disable the Protection items in the Tools menu. Libby "Robert Crandal" wrote: My workbook contains multiple sheets. After a set time period, the workbook will automatically run code that will password protect each and EVERY sheet in the workbook. My question is, what happens if a user decides to password protect a sheet with his/her own password before my code automatically tries to do the script above?? It will try to password protect a sheet that has already been password protected by the user, therefore it will fail right?? If this is true, can I prevent users from password protecting their sheets with their own passwords??? thank u . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sheet protection complications
Hello Libby.... thanks for your help, as always!
I dont have much experience using the "Userinterfaceonly" property. What happens when I set this to true? Is it also an Application object property?? "Libby" wrote in message ... Hi Robert, Why don't you protect the sheets in the workbook open event, but set the Userinterfaceonly property to true which will allow your code to run? You can then used the cells' locked property to lock and unlock various cells or ranges. Alternatively if you have a Excel 2003 or earlier you could disable the Protection items in the Tools menu. Libby |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sheet protection complications
Hi Libby.... I actually have another question....
Do you know if there is an easy way to set ALL cells on any given sheet to the "locked" property?? Or must I run a loop that go's through all cells to set them all to "locked"??? thnx "Libby" wrote in message ... Hi Robert, Why don't you protect the sheets in the workbook open event, but set the Userinterfaceonly property to true which will allow your code to run? You can then used the cells' locked property to lock and unlock various cells or ranges. Alternatively if you have a Excel 2003 or earlier you could disable the Protection items in the Tools menu. Libby |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sheet protection complications
Cells.locked=true will lock all cells
But only useful if the worksheet is also protected |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel Data Protection Best Practice: AKA: Real Sheet Protection | Excel Discussion (Misc queries) | |||
Excel Data Protection- AKA: Sheet/Macro Password Protection | Setting up and Configuration of Excel | |||
Value manipulation complications | Excel Discussion (Misc queries) | |||
Complications with formulas | Excel Discussion (Misc queries) | |||
sum complications | Excel Worksheet Functions |