Passwords in macros

  • Thread starter Thread starter Julian Glass
  • Start date Start date
J

Julian Glass

I have recorded which protects worksheets and the workbook with passwords.
The macro is stored in the Personal workbook. When I run the macro against
another workbook it runs ok but the passwords aren't embedded.

What have or done wrong or is this not possible. Looking at the the VB there
is no ref to password or encrypted data there.

Thanks
 
Julian, use something like this,

ActiveSheet.Protect Password:="123", DrawingObjects:=True,
Contents:=True, Scenarios:=True
ActiveWorkbook.Protect Password:="123", Structure:=True, Windows:=False

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003
 

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

Back
Top