unprotecting sheets

  • Thread starter Thread starter one
  • Start date Start date
O

one

I am searching for code that will protect and unprotect
ALL worksheets in the workbook. Any help?
 
Hi
try something like the following:

sub protect_all()
dim wks as worksheet
for each wks in worksheets
wks.protect password:="yourpassword"
next
end sub

sub unprotect_all()
dim wks as worksheet
for each wks in worksheets
wks.unprotect password:="yourpassword"
next
end sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top