Protect Workbook

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have some AutoOpen() routines including workbook protection

Sub AutoOpen(
ActiveWorkbook.Protect ("password"
End Su

When the workbook is protected from the previous close, this macro
actually turns protection off. If it was unprotected from the previous
close, then it turns back on. I can write a closing routine to counter
this, but it seems wierd to have to do this

Does anyone have ideas about this or am I doind something wrong
 
Hi

I have noticed this wierd behavior where protect acts
as a toggle in Excel 2002 as well. Why I don't know.

The only workaround I have found is to unprotect first,
then protect. This always seems to work correctly then.

ActiveWorkbook.Unprotect ("password")
ActiveWorkbook.Protect ("password")

HTH

KenM
 
Back
Top