I want to run a macro that simply unprotects all files in a folder, saves and closes. I have the passwords and related file names and paths in a list.
This is the macro that sets the passwords based on the list
Dim myB As Workbook
Dim myPW As String
Dim myC As Range
Dim ws As Worksheet
For Each myC In Range("A5", Cells(Rows.Count, 1).End(xlUp))
myPW = myC.Offset(0, 1).Value
Set myB = Workbooks.Open(myC.Value)
myB.Password = myPW
myB.Save
myB.Close
Next myC
Now I want to figure out away to reverse engineer that code so it will unprotect all the workbooks and save and close them as unprotected.
Thanks
Edit: I should also add that it is not necessary to have new macro based on that code above. I will be happy with any code that gets the job done.
Bookmarks