Password visible if user selects "view code"

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I recently added a command button to a worksheet to validate a timestamp. my
document is password protected but if the user selects edit from the control
toolbar and then right clicks and selects view code, they are able to see the
password. Is there anyway i can edit this so that they will not be able to do
this?
 
You must protect the VBA Project, not just the document.

With your workbook open hit ALT + F11 to go to VBEditor.

Select you workbook/project and right-click>VBA Project Properties

Click Protection tab and "locke project for viewing".

Enter a password.

You must now save and close the workbook.

When you re-open "View Code" will bring up a password dialg box.


Gord Dibben Excel MVP
 
Open VB Editor (ALT+F11), right-click the VBA project title in the project
window > Properties > Protection. Check the 'Lock project for viewing'
box and add a password. Save project

HTH Best rgds
Chris Lav
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top