ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   unprotecting sheets (https://www.excelbanter.com/excel-programming/295413-unprotecting-sheets.html)

one

unprotecting sheets
 
I am searching for code that will protect and unprotect
ALL worksheets in the workbook. Any help?

Anne Troy[_3_]

unprotecting sheets
 
Hi, One. Try at Dave Hawley's site:
http://www.ozgrid.com/VBA/excel-work...rotect-all.htm
<-*-<-*-<-*-<-*-<-*-<-*-<-*-<-*-
Hope this helps!
Anne Troy (better known as Dreamboat)
Author: Dreamboat on Word
Email: Dreamboat*at*Piersontech.com
Web: www.TheOfficeExperts.com
<-*-<-*-<-*-<-*-<-*-<-*-<-*-<-*-
"one" wrote in message
...
I am searching for code that will protect and unprotect
ALL worksheets in the workbook. Any help?




Frank Kabel

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?



All times are GMT +1. The time now is 09:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com