View Single Post
  #2   Report Post  
Nige
 
Posts: n/a
Default

Hi jamesanddavid - hmm... are you protecting and unprotecting the worksheet
(so individual cells can be locked, etc) and protecting/unprotecting the
workbook?

Probably obvious, but when you re-protect in code, are you specifying the
password for both worksheet and workbook then, and not only when
unprotecting? And again obviously.. you're saving the workbook AFTER you've
set the protection password(s)?

Nige


"jamesanddavid" wrote:


Hi,

I am running a Macro from one workbook that open another workbook which
has it's cells protected. As part of the Macro I enter the password to
unprotect the workbook, perform various functions, then reprotect the
workbook with the same password.

When I run the Macro it does all that I intended.

If I now open the 2nd workbook, the book is still protected. When I go
to choose unprotect, it does without any password!

So even though in the Macro I renter the password, it seems the Macro
is protecting the book but without any password!

I've double checked the code and redid the Macro several times all with
the same result.

Help!


--
jamesanddavid