How to Hide Excel VBA Code Using Password

Home More Excel (VBA) Training Videos

A website visitor wants to know how he can prevent people from seeing his VBA code in Microsoft Excel.
We know how to hide formulas, lock worksheet cells and protect a worksheet from our earlier videos.
The process of hiding the macro code is quite simple as shown in the training video:
  • In the Visual basic for Applications window click on 'Tools'
  • Click on 'VBAProject Properties'
  • Select the 'Protection' tab
  • Select the checkbox for 'Lock project for viewing'
  • Enter your password. Ensure it's a strong password using lower- and upper case characters, numbers and special characters like commas, +, etc.
  • Re-enter the password to confirm
  • Finally click on OK
Now the VBA code is hidden when you save the file and re-open it.

Watch the video below to see how the complete process is implemented quickly and easily:

Watch the video on YouTube
Home More Excel (VBA) Training Videos