h1

Tutorial 3.3: Password Protect VBA

Author: Ryan Ahlstrom-ryahlstrom@gmail.com

When we don’t want others tampering with our VBA code, we need to password protect the code.  To do this, press “Alt F11,” click on “Tools” and then “VBA Project Properties…” Click on the “Protection” tab and check the “Lock project for viewing” box.  Enter a password that you won’t forget and confirm the password.  Close the workbook and reopen it for the new password protection to take effect.

Warning: Passwords can be broken and there are most likely other ways to circumvent the password protection around the VBA code.  Our intent here is to provide one more “layer” of security around this portion of Excel not to make our code impenetrable.

33image1

The strongest passwords use a combination of upper and lower case letter, number, and symbols. See Tutorial 4.0 for information on password strength and security.

Leave a comment