在表格的SheetChange事件里用VBA加个保护:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Application.EnableEvents = False
If Target.HasFormula Then
MsgBox Sh.Name & ! & Target.Address(0, 0) & 是受保护的公式区域,不能改~
Application.Undo
End If
Application.EnableEvents = True
End Sub
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Application.EnableEvents = False
If Target.HasFormula Then
MsgBox Sh.Name & ! & Target.Address(0, 0) & 是受保护的公式区域,不能改~
Application.Undo
End If
Application.EnableEvents = True
End Sub