At the present moment I use this code to add protection
Code: Select all
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:=True, Password:=""
Code: Select all
ActiveSheet.Unprotect Password:=""
Here is what I was able to come up with so far, I believe "ActiveSheet" should be replaced with "ActiveWorkbook"
Code: Select all
With ActiveWorkbook.Protect("")
If ActiveWorkbook.Unprotect("") Then
Else
ActiveWorkbook.Protect ("")