K
Ken Hudson
I am using the following code to lock cells and protect a sheet. When I
re-open the saved workbook, I am not prompted for a password (dash) when I
unprotect it. What is wrong with my code?
TIA
........................
Range("B7,C7,D7,E7,F7,G7,B8,C8,F8,G8,G55,G94,G95,G144").Select
Selection.Locked = True
Selection.FormulaHidden = False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
ActiveSheet.Protect ("dash")
ActiveSheet.EnableSelection = xlUnlockedCells
ActiveWorkbook.SaveAs Filename:="Test", FileFormat _
:=xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:= _
False, CreateBackup:=False
ActiveWorkbook.Close False
.........................
re-open the saved workbook, I am not prompted for a password (dash) when I
unprotect it. What is wrong with my code?
TIA
........................
Range("B7,C7,D7,E7,F7,G7,B8,C8,F8,G8,G55,G94,G95,G144").Select
Selection.Locked = True
Selection.FormulaHidden = False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
ActiveSheet.Protect ("dash")
ActiveSheet.EnableSelection = xlUnlockedCells
ActiveWorkbook.SaveAs Filename:="Test", FileFormat _
:=xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:= _
False, CreateBackup:=False
ActiveWorkbook.Close False
.........................