Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • 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
Joined
Dec 16, 2001
Messages
67
Location
US
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
 
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

Back
Top