Be the first user to complete this post

  • 0
Add to List

Password Protection to Your Macro Code

In earlier sessions we saw that how we can write code, generate code and customize it but at the same time it’s very essential to protect it. Excel provides an option to make our Code password protected.

In Next few steps we will see how to make our macro secure.

Step 1:

 In VB Editor, right click on the “VBAProject(Book1)” in Project window and select “VBA Project Properties..”

Excel-VBA-MACRO - Password Protection To Macro - 1
Excel-VBA-MACRO - Password Protection To Macro - 1

"Project Properties" window will be displayed.

Excel-VBA-MACRO - Password Protection To Macro - 2
Excel-VBA-MACRO - Password Protection To Macro - 2

Step 2: Select the Protection tab

Step 3: Check “Lock Project For Viewing” Option

Step 4: Enter Password and Confirm Password.

Step 5: Hit OK Button

Next time when you open the Excel and if you try to expand “VBAProject(Book1)” , You will have to enter the password to access the code.



Also Read:

  1. Getting Started with Excel Macro
  2. Excel-VBA : Open a Excel File using Another Excel File using Browse Option.
  3. Add Tools to Quick Access Tool Bar(Excel Top Bar)
  4. Assign a Macro to a Button