A
Alan Smith
I've developed a workbook with a number of sheets. I want to prevent users
from copying or deleting sheets without suitable control so I used Excel VBA
code to protect and unprotect the workbook. The problem is that when I
protect the workbook with a password, when I get back to Excel I am able to
unprotect the workbook without providing the password. Can anyone explain
what I'm doing wrong please? The code is:
dim wkbkone as workbook
Set wkbkone = Application.ActiveWorkbook
wkbkone.Protect "abcd"
wkbkone.Protect "abcd"
ActiveWorkbook.Protect Structure:=True, Windows:=True
from copying or deleting sheets without suitable control so I used Excel VBA
code to protect and unprotect the workbook. The problem is that when I
protect the workbook with a password, when I get back to Excel I am able to
unprotect the workbook without providing the password. Can anyone explain
what I'm doing wrong please? The code is:
dim wkbkone as workbook
Set wkbkone = Application.ActiveWorkbook
wkbkone.Protect "abcd"
wkbkone.Protect "abcd"
ActiveWorkbook.Protect Structure:=True, Windows:=True