View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
RealmSteel[_2_] RealmSteel[_2_] is offline
external usenet poster
 
Posts: 9
Default Error message if duplicate data entered

You were right. I didn't think about that.

This is all I had to do:

If txtRFINum.Text = ActiveCell.Value Or txtRFINum.Text =
ActiveCell.Text Then
MsgBox "RFI Number Exists! Try Different Number."
GoTo DupRFI

Thanks a ton.

Rich

Zone wrote:
Realm,
Just a guess. Textbox values are text, so comparing a textbox value to
a number isn't going to work. How about this:
If Val(txtRFINum.Value) = ActiveCell.Value Then
Not tested! HTH, James