I tried this code, I feel that I almost got what I wanted but it gives an error, I feel that there is little left

Private Sub Worksheet_Change(ByVal Target As Range)    If Range("L:L") = "" Then
        Range("A3:K1048576").Locked = False
    ElseIf Range("L:L") = "inspector" Then
        Range("A3:K1048576").Locked = True
  Dim Lin As Integer
  Lin = ActiveCell.Row
  If Sheets("Planilha1").Cells(Lin, 12) <> "" Then
    Application.ScreenUpdating = False
    Sheets("Planilha1").Unprotect ("omiliso9001")
    Sheets("Planilha1").Select
    Sheets("Planilha1").Cells(Lin, 1).Locked = True
    Sheets("Planilha1").Cells(Lin, 2).Locked = True
    Sheets("Planilha1").Cells(Lin, 3).Locked = True
    Sheets("Planilha1").Cells(Lin, 4).Locked = True
    Sheets("Planilha1").Cells(Lin, 5).Locked = True
    Sheets("Planilha1").Cells(Lin, 6).Locked = True
    Sheets("Planilha1").Cells(Lin, 7).Locked = True
    Sheets("Planilha1").Cells(Lin, 8).Locked = True
    Sheets("Planilha1").Cells(Lin, 9).Locked = True
    Sheets("Planilha1").Cells(Lin, 10).Locked = True
    Sheets("Planilha1").Cells(Lin, 11).Locked = True
    Sheets("Planilha1").Cells(Lin, 12).Locked = True
    Sheets("Planilha1").Cells(Lin, 1).Interior.ColorIndex = 4
    Sheets("Planilha1").Cells(Lin, 2).Interior.ColorIndex = 4
    Sheets("Planilha1").Cells(Lin, 3).Interior.ColorIndex = 4
    Sheets("Planilha1").Cells(Lin, 4).Interior.ColorIndex = 4
    Sheets("Planilha1").Cells(Lin, 5).Interior.ColorIndex = 4
    Sheets("Planilha1").Cells(Lin, 6).Interior.ColorIndex = 4
    Sheets("Planilha1").Cells(Lin, 7).Interior.ColorIndex = 4
    Sheets("Planilha1").Cells(Lin, 8).Interior.ColorIndex = 4
    Sheets("Planilha1").Cells(Lin, 9).Interior.ColorIndex = 4
    Sheets("Planilha1").Cells(Lin, 10).Interior.ColorIndex = 4
    Sheets("Planilha1").Cells(Lin, 11).Interior.ColorIndex = 4
    Sheets("Planilha1").Cells(Lin, 12).Interior.ColorIndex = 4
    ActiveSheet.Protect ("omiliso9001")
  Else
End If
  End If
Application.ScreenUpdating = True
End Sub