How do I add a Password?

M

Metallo

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
 
F

Frank Kabel

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
....
 
M

Metallo

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top