I have to protect columns A:O from being edited in a worksheet I'm creating, but it doesn't seem to be working properly.
Set Wb = Workbooks.Add(XlWBATemplate.xlWBATWorksheet)
With Wb
With .Worksheets("Sheet1")
.Cells.Locked = False
.Columns("A:O").Locked = True
End With
Why are those columns able to be edited after I run the macro?
Rest of script underneath (including saving):
.SaveAs strNewPath & strFileName, Password:="password", FileFormat:=51
.Saved = True
.Close
End With
Set Wb = Nothing
End If
Next