Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Protecting VBA Project with Password

Status
Not open for further replies.

FM1

Structural
Dec 16, 2001
67
Hello everyone !

How can I protect the VBA project with a password so that the code modules may not be accessed by others.
To be clear, when you open the VBA screen from "TOOLS" "Macro..." there is a project window on the top left side, when you click on the project it shows all the components eg, modules, forms.... I like to prevent that by placing a password so double clicking on the project name or clicking on the "+" next to the project name will prompt the user for a password.

sorry about the long explanation, I will appreciate your help and response.
Searching the help file did not help,

Thanks
 
Replies continue below

Recommended for you

address your question from within the VBA HELP menu.

I have "crs" at the moment, i'm not at my pc, and cannot recollect the exact menu system commands.

-pmover
 
Hello.

Once you are in the VB Editor, select Tools/VBA Project Properties... then click on the Protection Tab of the dialog that appears. Check "Lock Project For Viewing", enter a password and click OK. When you close the associated workbook then re-open, attempting to access the VBA project, as you described, will prompt for a password.


HTH
Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor