ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Prevent User from Changing Password (https://www.excelbanter.com/excel-programming/418504-prevent-user-changing-password.html)

notso

Prevent User from Changing Password
 
I have a workbook that is password protected. I have a macro will hide and
unhide columns that users with the password can update. I have a button to
hide/unhide the columns on the sheet that is being displayed.

The problem is the user can unprotect the sheet from the tool bar and then
change the password. How do I prevent the user from doing this?

How can I force the user to reprotect the sheet with the pre-defined
password? Is there a VB event where I can check the new password with the
pre-defined password and force the user to enter the pre-defined password
only? I have password protected my VB code to prevent the users from seeing
the pre-defined password.

Jim Thomlinson

Prevent User from Changing Password
 
The problem is that the users have the password. Change the password and
don't let them know what it is... All of you macros can use that password to
protect and unprotect as necessary. If there is legitimate need for a user to
be able to change things then use the Tools - Protection - Allow users to
Edit feature (assuming XL2002 or better)...


--
HTH...

Jim Thomlinson


"notso" wrote:

I have a workbook that is password protected. I have a macro will hide and
unhide columns that users with the password can update. I have a button to
hide/unhide the columns on the sheet that is being displayed.

The problem is the user can unprotect the sheet from the tool bar and then
change the password. How do I prevent the user from doing this?

How can I force the user to reprotect the sheet with the pre-defined
password? Is there a VB event where I can check the new password with the
pre-defined password and force the user to enter the pre-defined password
only? I have password protected my VB code to prevent the users from seeing
the pre-defined password.


notso

Prevent User from Changing Password
 
OK. I will do that. Now I will add a password to the macro to enable certain
users to unhide the columns - without unprotecting the sheets. Thanks!

Do you have existing code handy for a macro to ask for a password? If not, I
can come up with it. This way I can give them the macro password, but not the
worksheets password. THANK YOU!

"Jim Thomlinson" wrote:

The problem is that the users have the password. Change the password and
don't let them know what it is... All of you macros can use that password to
protect and unprotect as necessary. If there is legitimate need for a user to
be able to change things then use the Tools - Protection - Allow users to
Edit feature (assuming XL2002 or better)...


--
HTH...

Jim Thomlinson


"notso" wrote:

I have a workbook that is password protected. I have a macro will hide and
unhide columns that users with the password can update. I have a button to
hide/unhide the columns on the sheet that is being displayed.

The problem is the user can unprotect the sheet from the tool bar and then
change the password. How do I prevent the user from doing this?

How can I force the user to reprotect the sheet with the pre-defined
password? Is there a VB event where I can check the new password with the
pre-defined password and force the user to enter the pre-defined password
only? I have password protected my VB code to prevent the users from seeing
the pre-defined password.



All times are GMT +1. The time now is 02:57 AM.

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