I am searching for code that will protect and unprotect ALL worksheets in the workbook. Any help?
O one Apr 17, 2004 #1 I am searching for code that will protect and unprotect ALL worksheets in the workbook. Any help?
A Anne Troy Apr 17, 2004 #2 Hi, One. Try at Dave Hawley's site: http://www.ozgrid.com/VBA/excel-worksheet-protect-all.htm <-*-><-*-><-*-><-*-><-*-><-*-><-*-><-*-> Hope this helps! Anne Troy (better known as Dreamboat) Author: Dreamboat on Word Email: Dreamboat*at*Piersontech.com Web: www.TheOfficeExperts.com <-*-><-*-><-*-><-*-><-*-><-*-><-*-><-*->
Hi, One. Try at Dave Hawley's site: http://www.ozgrid.com/VBA/excel-worksheet-protect-all.htm <-*-><-*-><-*-><-*-><-*-><-*-><-*-><-*-> Hope this helps! Anne Troy (better known as Dreamboat) Author: Dreamboat on Word Email: Dreamboat*at*Piersontech.com Web: www.TheOfficeExperts.com <-*-><-*-><-*-><-*-><-*-><-*-><-*-><-*->
F Frank Kabel Apr 17, 2004 #3 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
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