0

I've been protecting my sheet from changes and suddenly it's telling me that property Locked cannot be assigned and I've seen that the methods from Range don't seem to work, but it's only in this file. Please help me.

Sub Protecion()
    Sheets(Sheets.Count - 1).Unprotect
    Sheets(Sheets.Count - 1).Cells.Locked = True
    Sheets(Sheets.Count - 1).Range("D6:F28,K5:M34,R7:V14,T15:U17,Y5:AB16,AE12,AE14,AE15,AG6:AG12,AG15,AK5:AK12,AP4:AR6,B6:B27,AH15,B33:B54,M5:M34").Locked = False
    Sheets(Sheets.Count - 1).Protect
End Sub
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459

0 Answers0