View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Corey ....[_2_] Corey ....[_2_] is offline
external usenet poster
 
Posts: 45
Default Sheet Protection & Password

Something like:
Sub Unprotect()
ThisWorkbook.Worksheets("Report").Unprotect Password:="Password HERE"
ActiveSheet.Unprotect
End Sub

Sub Protect()
ThisWorkbook.Worksheets("Report").Protect Password:="Password HERE"
ActiveSheet.Protect
End Sub

You could add the codes to the WorkSheet_Change vent or similar to suit.


Corey...


"will07" wrote in message
...
Hello Everybody,

Is it possible to add some code to each worksheet that will enable me to
protect the worksheet and have a permanent password. At the moment, when
you
unprotect the worksheet, you have to re-enter the password (twice) to
protect
it again. I would like to be able to have the password in place all the
time
so the user does not have to re-enter it again and again.

Thanks heaps