TM - - Thank you for helping me with this, your suggestions on codes, etc worked out very well. I took the code that you suggested and modified it to meet my needs. I'm pasting in what I call a completed VBA code. This Code does the following:
1) Adds all excel files found in a specific folder to a variable called ColFiles
2) Opens each workbook one at a time
3) While the first book is open it searches for Sheet2 and Sheet3 and if found deletes them, if not found it moves on
4) Checks the value in cell AP11
5) Based on that value - use a case statement to assign a password
6) Saves the workbook in the same folder but with this new password.
7) Repeats Step 2 - 7 until the list is complete.
I think that is about it! Thanks again, smart dude - pushed me in the correct direction!!
Hello -- I have a bit of a problem with the code below. I attempting to set the password for a group of excel workbooks based on the value found in AQ11. The code runs through without error but when I go to the excel files after the files are saved I am not prompted to open them with the new password, the files open without the password. Can someone take a look and point me in the right direction? I put in red the reference to the cell value. Thanks you.
Bookmarks