Sub 设置()
Application.MoveAfterReturnDirection = xlToRight
Columns("A:F").Locked = False
ActiveSheet.Protect
End Sub
Sub 复原()
Application.MoveAfterReturnDirection = xlDown
ActiveSheet.Unprotect
Columns("A:F").Locked = True
End Sub
作一点修改:
Sub 设置()
Application.MoveAfterReturnDirection = xlToRight
Columns("A:F").Locked = False
ActiveSheet.Protect
ActiveSheet.EnableSelection = xlUnlockedCells
End Sub
Sub 复原()
Application.MoveAfterReturnDirection = xlDown
ActiveSheet.Unprotect
Columns("A:F").Locked = True
End Sub