Locking all Spreadsheets together

P

Piotr

Hi,
I have many spreadsheets and I wish to lock all of them, it is very
difficult for me going through all of them every time I need to change
anything.
Locking whole workbook doesnt let me use options i need to use.

Is there any other easy way ?
 
P

Paul B

piotr, if you are talking about worksheets in a workbook you could use a
macro like this to protect and unprotect them

Sub protect_all_sheets()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Protect password:="123"
Next ws
End Sub

Sub unprotect_all_sheets()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Unprotect password:="123"
Next ws
End Sub


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003
 
P

Paul B

Your welcome


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003
 
Top