I am trying to unprotect a spreadsheet from some code in a workbook. Below
is the code:


ActiveWorkbook.Sheets("TRANSACTIONS")
. Unprotect strPassWord
ā€˜*** do stuff to worksheet
End with

This code is in a xla workbook.

If the code is called from the activeworkbook in a non save mode then it
works.

If the code is called from the Workbook.BeforeSave event then the code stops
with a protection error.
At this point, even in a debug mode, the sheet protection will not turn off.

Is there a known issue that prevents the activeworkbook sheet protection to
not be change during the before save event?

Any thoughts or work around?

Thanks in advance

--
Stewart Rogers
DataSort Software, L.C.