Worksheet Protection

G

Guest

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top