I haven't used any of your code as it's a picture that I can't copy/paste, but this should give you the idea. Uff, hope the above makes sense and thanks for reading However the procedure still stops if the first pass option is incorrect and I have to manually drag the execution line to the next valid pass for the procedure to continue.Įssentially my questions are: is the code set up above ok and is there a way of making VBA to attempt another password to unprotect sheet if the first pass is not the correct one (and a third attempt if the 2nd pass is also incorrect)? I know the pass options so i put it in my code as per below: My problem is that for the changes to be applied to each excel file the sheet has to be unprotected and there is unfortunately 3 different options for pass (dont ask me why). excel files are password protected so it inputs the password, opens the file, then unprotects a specific sheet (as sheets are also pass protected) and does some changes to the file.opens a bunch of excel files (separately not at once) from a specific folder (user indicates the folder).I put together a VBA procedure that does the following:
0 Comments
Leave a Reply. |