View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default unprotecting sheets

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


--
Regards
Frank Kabel
Frankfurt, Germany


one wrote:
I am searching for code that will protect and unprotect
ALL worksheets in the workbook. Any help?