title: Securely store password in a VBA project
body: <p>I built a file used by various people in one of my company service.</p>
  
  <p>Each sheet is protected by a password and all users entries are handled with a VBA user form. All sheets are protected by the same password and my code protect/unprotect sheet when users modify data. </p>
  
  <p>The problem is I'm storing the password in clear text in the VBA project so as to call the <code>ActiveSheet.Protect password</code> method. The VBA project is also protected by this password.</p>
  
  <p><strong>Is there a secure way to store that password in the VBA project ?</strong></p>
  
  <p>Anyone who knows how to search a bit would find a code to crack that VBA project password and be able to read it.</p>
  
  <p><strong><em>EDIT :</em></strong></p>
  
  <p>I have thought of computing a new password each time the file is open by adding some randomness in it. This way one could read the code without knowing the password. Adding a msgbox could reveal it but only until the file is reopenend. The problem is I cannot manually unprotect/protect sheet with that method as I won't be aware of the password.</p>