ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Password visible if user selects "view code" (https://www.excelbanter.com/excel-worksheet-functions/58514-password-visible-if-user-selects-view-code.html)

kcdonaldson

Password visible if user selects "view code"
 
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?

Gord Dibben

Password visible if user selects "view code"
 
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-clickVBA 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

On Fri, 2 Dec 2005 14:38:04 -0800, "kcdonaldson"
wrote:

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?


Chris Lavender

Password visible if user selects "view code"
 
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


"kcdonaldson" wrote in message
...
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?





All times are GMT +1. The time now is 04:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com