About Encrypting VBA Code Modules (VBA)

Although VBA does not support creation of executables, it does offer password protection for the visibility of the project forms, classes, and modules on a project basis.

You can find this Project Protection facility on the VBA IDE menu bar. Click the Tools menu Project Properties Protection.