Sub BulkUnProtect()
Dim theWB As Workbook
Dim fso As FileSystemObject: Set fso = New FileSystemObject
Dim theFolder As Folder: Set theFolder = fso.GetFolder("YourFolderPath")
Dim theFile As File
On Error Resume Next
For Each theFile In theFolder.Files
If theFile.Type = "Microsoft Excel Worksheet" Then
Set theWB = Workbooks.Open(theFile.Path)
theWB.Unprotect ("YourPassw0rd")
theWB.Close True
End If
Next theFile
On Error GoTo 0
Set theWB = Nothing
Set fso = Nothing
End Sub
theWB.Unprotect ("YourPassw0rd")
theWB.Unprotect ("")
Dim wks as WorkSheet
For Each wks in ThisWorkbook.WorkSheets
wks.Unprotect
'do stuff
wks.Protect
Next wks