+ Reply to Thread
Results 1 to 5 of 5

Check for duplicate entry in a userform and fill in text boxes with duplicate information

  1. #1
    Registered User
    Join Date
    01-31-2014
    Location
    Tulsa, OK
    MS-Off Ver
    Excel 2007
    Posts
    2

    Check for duplicate entry in a userform and fill in text boxes with duplicate information

    Hi all,
    I have created a userform in Excel 2010 for use as an inventory count entry form. After entering a tag number in txt1, txt2 - txt4 is automatically populatd. txt5 - txt6 are manual entries.
    My problem is that a tag number should be entered only once. If the user enters the same number, I need to caution them that the number has already been entered and the entry needs to populate all text boxes with the information previously entered. If the quantity in txt5 then needs to be revised, the user is able to do so.
    Attached Files Attached Files

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Check for duplicate entry in a userform and fill in text boxes with duplicate informat

    Hi SueW,

    Welcome to the Forum!

    Maybe:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Check for duplicate entry in a userform and fill in text boxes with duplicate informat

    Avoid using worksheetfunctions if there's a valid VBA alternative.
    I Rewrote your Add-button code since you didn't take into account that it could be a revised previously entered tag.
    Play around with the form and let us know if it works as expected.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    01-31-2014
    Location
    Tulsa, OK
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Check for duplicate entry in a userform and fill in text boxes with duplicate informat

    Thanks so much. I did play around a little and found the perfect match between your code and mine. Works like it should.
    Thanks again

  5. #5
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Check for duplicate entry in a userform and fill in text boxes with duplicate informat

    Thanks for the feedback and the rep

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Userform to check 2 textboxes for duplicate & date check
    By LadyAlina in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-24-2015, 09:26 AM
  2. Replies: 0
    Last Post: 02-04-2014, 12:36 AM
  3. Vlookup with duplicate check and auto fill on duplicates
    By vjmcdonnell in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-13-2013, 11:14 AM
  4. [SOLVED] Prevent duplicate entry in userform
    By vijaynadiad in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-01-2013, 02:29 PM
  5. userform duplicate entry check writing to sheet
    By cfinch100 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-06-2013, 06:21 AM
  6. Code to check for duplicate entry
    By renden in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-02-2012, 05:00 AM
  7. how to check the duplicate data entry in form?
    By jay11 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-18-2010, 01:59 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1