DV will give warnings or it wont work as you intend.
Alternative:
replace the DV with an event handler for the sheet.
e.g. all cells with Yellow background.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count 1 Then
Exit Sub
ElseIf Len(Target) = 0 Then
Exit Sub
End If
'Process this for all cells with a YELLOW fill.
If Target.Interior.ColorIndex = 6 Then
Select Case Target.Value
Case 0 To 10
'allow integers only
If Target.Value2 < CLng(Target.Value2) Then
Target.Value2 = CLng(Target.Value2)
End If
Case Else
Beep
Target.ClearContents
End Select
End If
End Sub
--
keepITcool
|
www.XLsupport.com | keepITcool chello nl | amsterdam
Jean-Paul De Winter wrote :
Hi,
I set up a validation rule when entering cells
Only numbers lower the 10 are allowed.
When I enter 11 I get a warning asking if, eventually I want to
accept the entry.
NO WAY to accept so... how to avoid the quetion from being asked? All
I want is just to refuse the entry.
Thanks