Sub UnlockPreviousRow(Target As Range)
Dim PreviousRow As Integer
Dim CurrentRow As Integer
'获取目标单元格的行号
CurrentRow = Target.Row
'将先前已锁定的单元格解锁
For PreviousRow = 1 To CurrentRow - 1
If Cells(PreviousRow, Target.Column).Locked = True Then
Cells(PreviousRow, Target.Column).Locked = False
End If
Next PreviousRow