在表格的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