Re: Validation is not working

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



the change event only fires when someone edits a cell. It seems unlikely
someone will edit a cell and leave it blank.

In the code I sent you I did put a cursory check to identify if there are
any blanks in column L before the current entry.

--
Regards,
Tom Ogilvy



"Curt" <Curt@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:E16D150E-18F4-4D67-9B38-C7070BBC7642@xxxxxxxxxxxxxxxx
Searching found this close. Want to require entry into each cell in row
not
allow blanks. Like the msgbox idea. Does not sound so demanding but gets
the
job done.
will play with this and hopeing.
Thanks

"Gary Keramidas" wrote:

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" <David@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:AFE44060-8965-463F-84C5-554FE89AC3D8@xxxxxxxxxxxxxxxx
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





.



Relevant Pages

  • Re: creat a pop up box
    ... "Dave Peterson" wrote: ... Private Sub Worksheet_Change ... 'one cell at a time ... MsgBox "NEW RECORD" ...
    (microsoft.public.excel.misc)
  • Re: creat a pop up box
    ... Private Sub Worksheet_Change(ByVal Target As Range) ... 'one cell at a time ... MsgBox "NEW RECORD" ...
    (microsoft.public.excel.misc)
  • Re: creat a pop up box
    ... Private Sub Worksheet_Change(ByVal Target As Range) ... 'one cell at a time ... MsgBox "NEW RECORD" ...
    (microsoft.public.excel.misc)
  • Re: creat a pop up box
    ... In column e rows 3 thru 33 when they enter a number in a cell and its the ... "Dave Peterson" wrote: ... Private Sub Worksheet_Change ... MsgBox "NEW RECORD" ...
    (microsoft.public.excel.misc)
  • Re: creat a pop up box
    ... Private Sub Worksheet_Change(ByVal Target As Range) ... 'one cell at a time ... MsgBox "NEW RECORD" ...
    (microsoft.public.excel.misc)