Julian, use something like this,
ActiveSheet.Protect Password:="123", DrawingObjects:=True,
Contents:=True, Scenarios:=True
ActiveWorkbook.Protect Password:="123", Structu=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
"Julian Glass" wrote in message
. uk...
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