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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lock project for viewing and setting password

Status
Not open for further replies.

3576

Programmer
Jan 28, 2005
32
US
I need to set a "password" and "lock project for viewing" using excel vb code. I know that the following code prevents a user from making any changes to the spreadsheets:
xlBook.Protect Password:="Password" but I need to prevent a user from viewing and making changes to the code.
Thanks for any help.

TW
 
Can you right click on the project from the properties viewer and then set it the project properties tab.
 
Thanks for your reply.
I can do it manually but I need to do it using the code.
TW
 
Normally, allowing it to be done in code is a security risk in itself. I am unaware of any way to do it in code.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top