How to Protect VBA Code
Open the Visual Basic Editor, usually found under "Macro" in the "Tools" menu., Go to the "Protection" tab. , Select the "Lock Project for Viewing" check box., Create and confirm your desired password in the indicated boxes. , Save, close, and...
Step-by-Step Guide
-
Step 1: Open the Visual Basic Editor
(In Access, you may need to be in the database window to reach the editor, depending on your computer set-up.) Select "Project Properties" in the "Tool" menu within the Visual Basic Editor. -
Step 2: usually found under "Macro" in the "Tools" menu.
, If you don't check this box, you won't hide your code. ,, (In Microsoft Excel 2007 and later, you may need to save as an XLSM file for your code to work.) -
Step 3: Go to the "Protection" tab.
-
Step 4: Select the "Lock Project for Viewing" check box.
-
Step 5: Create and confirm your desired password in the indicated boxes.
-
Step 6: and reopen your workbook for the protection to take effect.
Detailed Guide
(In Access, you may need to be in the database window to reach the editor, depending on your computer set-up.) Select "Project Properties" in the "Tool" menu within the Visual Basic Editor.
, If you don't check this box, you won't hide your code. ,, (In Microsoft Excel 2007 and later, you may need to save as an XLSM file for your code to work.)
About the Author
Anna Morales
A seasoned expert in advertising, Anna Morales combines 2 years of experience with a passion for teaching. Anna's guides are known for their clarity and practical value.
Rate This Guide
How helpful was this guide? Click to rate: