Not sure if this is by design or error ... If you provide parameters, it works fine:
ActiveWorkbook.Protect ,true,true
or
ActiveWorkbook.Protect Structure:= true
What do you need / need. Thus, it will not disable protection, only on.
To disable protection, you can use this (if you only enabled structure protection):
ActiveWorkbook.Protect Structure:= false
Parameters:
.Protect(Password, Structure, Windows)
vacip source
share