How to Lock Excel VBA Code



To lock your VBA code in excel click on tools.
click on tools in your menu bar

Select macro.
Select macro from the drop down menu

Select visual basic editor.
Select visual basic editor

Select your vba project and right click.
Select VBA project and right click

Select VBA Project properties.
Select VBA project properties

Click on the protection tab.
Select the protection tab

Check the box to lock project for viewing.
Check the box for locking project for viewing

Enter your password and confirm this password. Click OK and your project is now locked.
Confirm your password and click OK