Password protection

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can anyone help me write 2 macros to turn on and turn off password
protection? I want to be able to add these to macros I already have so that
the user doesn't get the enter password screen. For arguments sake, the
password is "monkey".

Thanks,

Nick
 
Hi Nick,

sub Unprotect
dim ws as worksheet
for each ws in activeworkbook.worksheets
ws.unprotect "monkey"
next ws
end sub

sub Protect
dim ws as worksheet
for each ws in activeworkbook.worksheets
ws.protect "monkey"
next ws
end sub

Regards,
Ivan
 
Back
Top