ElvisSteel
Board Regular
- Joined
- Mar 23, 2009
- Messages
- 122
Hi,
Cells C3:C32 have data validation for a dropdown list.
I need to prevent the user from deleting any entries in this column.
The "Ignore Blanks" checkbox doesn't appear to have any effect, so I am using the following code...
This works fine when they try to delet a single cell, but I want to stop them selecting multiple cells in this range and then deleting them.
I assume I must test for Target > 1 and then do something but I'm not sure what.
Can anyone help please
Thanks (again)
Cells C3:C32 have data validation for a dropdown list.
I need to prevent the user from deleting any entries in this column.
The "Ignore Blanks" checkbox doesn't appear to have any effect, so I am using the following code...
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("C3:C32")) Is Nothing Then
If Target = "" Then
Range("C" & Target.Row).Value = PrevCust
End If
End If
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Application.CutCopyMode = xlCut Then Application.CutCopyMode = False
PrevCust = Range("C" & Target.Row).Value
End Sub
I assume I must test for Target > 1 and then do something but I'm not sure what.
Can anyone help please
Thanks (again)