S
Stuart
A simple routine which starts as:
With ActiveWorkbook.Worksheets("Master CVI")
.Unprotect Password:="SGB"
.Cells.Locked = False
(code now works with just this sheet, and finally
protects it, before closing the With statement)
'Protect the sheet
.Protect Password:="SGB"
.EnableSelection = xlUnlockedCells
End With
I now immediately say:
'Protect the workboook
ActiveWorkbook.Protect Password:="SGB"
End Sub
and it's on this last line that the error is raised.
Why so, please?
Regards.
With ActiveWorkbook.Worksheets("Master CVI")
.Unprotect Password:="SGB"
.Cells.Locked = False
(code now works with just this sheet, and finally
protects it, before closing the With statement)
'Protect the sheet
.Protect Password:="SGB"
.EnableSelection = xlUnlockedCells
End With
I now immediately say:
'Protect the workboook
ActiveWorkbook.Protect Password:="SGB"
End Sub
and it's on this last line that the error is raised.
Why so, please?
Regards.