ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Passwords (https://www.excelbanter.com/excel-programming/414023-passwords.html)

ranswrt

Passwords
 
I want to be able to use a password to protect the sheets. How do I write a
procedure that unprotects these sheets using a password?

Also, I checked the box below to get notified by email when I get a reply,
but I haven't been getting emails notifying me when a question is answered.
What do I need to do?

Thanks

Jim Thomlinson

Passwords
 
Sheets("Sheet1").UnProtect Password:="tada"

Sheets("Sheet1").Protect Password:="tada"

As for the e-mail thing... Not a clue...
--
HTH...

Jim Thomlinson


"ranswrt" wrote:

I want to be able to use a password to protect the sheets. How do I write a
procedure that unprotects these sheets using a password?

Also, I checked the box below to get notified by email when I get a reply,
but I haven't been getting emails notifying me when a question is answered.
What do I need to do?

Thanks


StumpedAgain

Passwords
 
Make sure your emails aren't gong to junk mail? If not that... beats me.

Along with Jim's code it should be noted that someone can open the VBA
Editor and look at your password. To prevent this in the VBE (editor) go to
Tools-VBA Project Properties. Select the Protection tab and select Lock
Project for Viewing. Enter a password and click OK.
--
-SA


"ranswrt" wrote:

I want to be able to use a password to protect the sheets. How do I write a
procedure that unprotects these sheets using a password?

Also, I checked the box below to get notified by email when I get a reply,
but I haven't been getting emails notifying me when a question is answered.
What do I need to do?

Thanks


ranswrt

Passwords
 
Thanks

"StumpedAgain" wrote:

Make sure your emails aren't gong to junk mail? If not that... beats me.

Along with Jim's code it should be noted that someone can open the VBA
Editor and look at your password. To prevent this in the VBE (editor) go to
Tools-VBA Project Properties. Select the Protection tab and select Lock
Project for Viewing. Enter a password and click OK.
--
-SA


"ranswrt" wrote:

I want to be able to use a password to protect the sheets. How do I write a
procedure that unprotects these sheets using a password?

Also, I checked the box below to get notified by email when I get a reply,
but I haven't been getting emails notifying me when a question is answered.
What do I need to do?

Thanks



All times are GMT +1. The time now is 05:25 PM.

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