Worksheet Protection

C

Coxy

Hi

Question raised in training today - a number of workbooks have been created
where each individual worksheet is protected to allow certain users to modify
certain cells.

One user needs to be able to access all worksheets in all workbooks without
the protection. He is currently unprotecting each worksheet separately and
wondered if there was any way he could unprotect all worksheets in one go. He
does not want to protect the whole workbook.

Please help because I can't think of any way it can be done?!?!?

Any help would be greatly appreciated.

Thanks
 
J

JE McGimpsey

One way:

Public Sub UnProtectAll()
Const sPWORD As String = "drowssap"
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
ws.Unprotect sPWORD
Next ws
End Sub
 
C

Coxy

This works - thank you very much!!!

JE McGimpsey said:
One way:

Public Sub UnProtectAll()
Const sPWORD As String = "drowssap"
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
ws.Unprotect sPWORD
Next ws
End Sub
 
Top