Validation is not working
try this in place of your code
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count 1 Then Exit Sub
If Target.Address = "$H$3" Then
Set rng = Range("B3")
If Target.Value = rng Then
MsgBox "That Entry is NOT ALLOWED!"
End If
End If
End Sub
--
Gary
"David" wrote in message
...
I am trying to get a MsgBox to pop up if the value entered into a cell is
equal to or greater than the value in another cell, but no MsgBox ever comes
up. The code is in the sheet I'm working on. Help!
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ws_exit:
Application.EnableEvents = False
If Target.Address = "$H$3" Then
If Target.Value = "$B$3" Then
MsgBox "That Entry is NOT ALLOWED!"
End If
End If
ws_exit:
Application.EnableEvents = True
End Sub
|