Is there a way to protect a VBE project using a macro instead of going to the properties and manually typing in a password? I'm using a macro that emails just one worksheet in my workbook (creates a new temp file, emails, and deletes it) but when the new file gets to the recipient the VBE project is unlocked. I found a way to protect the worksheet before saving the temp file, so the worksheet is protected as it should be, but the project explorer window is completely open. Then anybody can see the passwords I'm using to protect the sheet in the first place. So I need to somehow re-protect the project before it saves and emails. I heard something about sendkeys but I have no clue what that is! Thanks for the help!
P.S. I'm using Ron's code for doing all this (first method for outlook only, emailing a single worksheet from a workbook.) Thanks!
HTML Code:
Bookmarks