Restricting the user to delete the cell contents
问题 Is there's any way to restrict the user from deleting the cell contents without using the protect method of excel. I have this code: Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) Dim ws As Worksheet Set ws = ThisWorkbook.Worksheets("Sheet1") If Not Intersect(Target, Range("C21:D" & ws.Range("C" & ws.Rows.Count).End(xlUp).Row)) Is Nothing Then Cancel = True MsgBox "You are not allowed to edit!", vbCritical + vbOKOnly EndIf End sub But this only disallows the