Provide the best software to recover passwords for
Windows, SQL Server, PDF, Word, Excel, Outlook, FTP, Email, etc.
Home > Password Recovery Bundle > Lock VBA Project with Password

How to Lock VBA Project with Password in Excel 2016 / 2013

How can I lock down the VBA project to prevent others from seeing or messing up your code? Just like you can use password to protect a workbook or worksheet, you can also set a password to protect VBA macros in Excel. In this tutorial we'll show you how to lock VBA project with a password in Excel 2016 / 2013.

Password Protect VBA Project in Excel 2016 / 2013

  1. Open the Excel file in Office Excel 2016 / 2013. Right-click on any worksheet tab at the bottom of your screen, and then select View Code.

  2. This will open the Microsoft Visual Basic for Applications window. Click the Tools menu and then choose VBAProject Properties.

  3. On the Protection tab, check the "Lock project for viewing" option, then type and confirm the password that you want to protect the VBA macros/code from viewing.

  4. Save the workbook as Excel Macro-Enabled Workbook format, and then close it so that the password protection takes effect. Next time you open the workbook and try to view the code you will be prompted for the VBA password.

That's it!

Related Articles