I am working with several workbooks that are protected. I want to loop through them, do some stuff on each one and print out a copy. I have inserted code to unprotect the sheet with the correct password. However, an error occurs when the code tries to edit the workbook because, in reality, it has not been unprotected at all. While in debug mode, I can go and unprotect the sheet manually with Excel (with the same password) and it is unprotected. However, I inserted an error handler that tries to unprotect the sheet again. This causes the code to just continuously loop and never unprotects the sheet. Here is my code:
Any help would be greatly appreciated. Thanks.
Bookmarks