ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Password Protect a single sheet using VBA (https://www.excelbanter.com/excel-worksheet-functions/159180-password-protect-single-sheet-using-vba.html)

Carlee

Password Protect a single sheet using VBA
 
Hello All,
Question:
How can i programmatically password protect a single password.

I want the user to be presented with an input box where they are asked to
enter a password. If the password entered is correct, then go to Sheet 1,
else display a message saying 'Incorrect Password' and return the user to the
Main Menu, preventing the user from accessing Sheet 1.

Suggestions?
--
Carlee

JE McGimpsey

Password Protect a single sheet using VBA
 
It is somewhat difficult to implement this, and if you truly want to
*prevent* an unauthorized user from accessing the worksheet, it's
ultimately futile. XL's internal protection is so tissue thin that
anyone with the ability to access these newsgroups can find free and
quick methods to bypass it.

You can find many suggestions in the archives - the most useful will use
event macros to hide all sheets but the Main Menu in the Before_Save
event, and call a routine/userform to input a password in the
Workbook_Open event, unhiding the sheet if the password is valid.

But again, most implementations can be bypassed in 30 seconds or so...

You're a bit better off if you use a separate workbook for your Sheet 1,
with a workbook/file password - that protection takes perhaps a minute
to bypass.



In article ,
Carlee wrote:

Hello All,
Question:
How can i programmatically password protect a single password.

I want the user to be presented with an input box where they are asked to
enter a password. If the password entered is correct, then go to Sheet 1,
else display a message saying 'Incorrect Password' and return the user to the
Main Menu, preventing the user from accessing Sheet 1.

Suggestions?



All times are GMT +1. The time now is 09:15 AM.

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