LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 269
Default Error message if duplicate data entered

well, maybe with a textbox...heh J
Zone wrote:
Realm, You are most welcome. As usual, I have learned something from
answering a post. Your approach to the problem is interesting. I've
never used the .Text property with either a textbox or a cell. This
property seems to be interpreting the two variables as text, regardless
of what they are, so I'll file that away for future reference.
Tally-ho! James
RealmSteel wrote:
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




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error message needed if incorrect Date Of Birth (DOB) entered Craig Excel Worksheet Functions 5 January 27th 10 08:24 PM
Data error message Faceter Excel Discussion (Misc queries) 1 October 16th 09 07:19 PM
Create error message if number entered is greater than previous ce Joe Lewis Excel Discussion (Misc queries) 2 July 25th 08 01:59 AM
Prevent duplicate data from being entered into the same column Char Excel Worksheet Functions 3 August 29th 07 03:28 PM
How to give an error message if a cell value entered is larger than permitted Colin Hayes Excel Discussion (Misc queries) 7 May 16th 07 02:39 PM


All times are GMT +1. The time now is 02:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"