Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 309
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 151
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 309
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 309
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 137
Default 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
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
Excel Data Protection Best Practice: AKA: Real Sheet Protection Mushman(Woof!)[_2_] Excel Discussion (Misc queries) 4 December 30th 09 01:20 AM
Excel Data Protection- AKA: Sheet/Macro Password Protection Mushman(Woof!) Setting up and Configuration of Excel 0 December 29th 09 06:50 AM
Value manipulation complications Vic Excel Discussion (Misc queries) 5 April 3rd 09 09:56 PM
Complications with formulas andrew Excel Discussion (Misc queries) 1 June 26th 08 07:41 AM
sum complications ellebelle Excel Worksheet Functions 0 July 18th 07 01:32 PM


All times are GMT +1. The time now is 11:46 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"