View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
WimR WimR is offline
external usenet poster
 
Posts: 6
Default Running a macro to protect a workbook on a already protected workbook UNprotects the workbook ??

My code in the workook_open() macro includes the following to ensure
the workbook is protected at all times.

ActiveWorkbook.Protect Password:=Range("adminpassword").Value

When this code runs while the workbook IS protected, it actually causes
the workbook to be UNPROTECTED.

How strange is this ??!!

Does anybody know why this happens and how I can prevent this from
happening.

I am running Excel 2003

thank you very much for your help.

Wim