ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How do I add a Password? (https://www.excelbanter.com/excel-programming/303967-how-do-i-add-password.html)

Metallo[_5_]

How do I add a Password?
 
Hi,

I've got this Workbook_Open code and I'd like to add a password i
order to unable the users to unprotect the sheets.
I just need one password for all the sheets.
Since I don't know how and where to put the password, your help vital.

I enclose the code.

Thank you!
Alex
Bad

Attachment filename: private sub workbook.txt
Download attachment: http://www.excelforum.com/attachment.php?postid=61655
--
Message posted from http://www.ExcelForum.com


Frank Kabel

How do I add a Password?
 
Hi
use somehing like
....
dim wks as worksheet
for each wks in activeworkbook.worksheets
wks.protect password:="yourpassword" 'and the other protect options
you may nee
next
....

--
Regards
Frank Kabel
Frankfurt, Germany


Hi,

I've got this Workbook_Open code and I'd like to add a password in
order to unable the users to unprotect the sheets.
I just need one password for all the sheets.
Since I don't know how and where to put the password, your help

vital.

I enclose the code.

Thank you!
Alex
Bad:

Attachment filename: private sub workbook.txt
Download attachment:
http://www.excelforum.com/attachment.php?postid=616555 ---
Message posted from http://www.ExcelForum.com/



Metallo[_4_]

How do I add a Password?
 
Frank,

I tried and tried, but it goes in conflict with the existing protection
code.

Can you have a look to the existing code and let me know where am i wrong?

I'm sure there's too much into it if I add your code.

Thanks
Alex
"Frank Kabel" wrote in message
...
Hi
use somehing like
...
dim wks as worksheet
for each wks in activeworkbook.worksheets
wks.protect password:="yourpassword" 'and the other protect options
you may nee
next
...

--
Regards
Frank Kabel
Frankfurt, Germany


Hi,

I've got this Workbook_Open code and I'd like to add a password in
order to unable the users to unprotect the sheets.
I just need one password for all the sheets.
Since I don't know how and where to put the password, your help

vital.

I enclose the code.

Thank you!
Alex
Bad:

Attachment filename: private sub workbook.txt
Download attachment:
http://www.excelforum.com/attachment.php?postid=616555 ---
Message posted from http://www.ExcelForum.com/






All times are GMT +1. The time now is 01:58 AM.

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