+ Reply to Thread
Results 1 to 4 of 4

Userform to check 2 textboxes for duplicate & date check

  1. #1
    Registered User
    Join Date
    03-24-2015
    Location
    India
    MS-Off Ver
    2010,2013
    Posts
    2

    Userform to check 2 textboxes for duplicate & date check

    Hi,
    Thanks in advance. I am new to VBA and so I need help of this forum experts to help me with 2 things in a userform.

    I have a userform all set and ready to use but I'm facing a problem with it. The problem is I want the submit button to check if the entry has already been made by checking 2 textboxes (Textbox1 & Textbox2) with the columns in sheet (Column A & D). If both the textboxes' enry matches with the existing data then it should replace the row after giving a message else add it to next empty row. I used one code I got from this forum but it didnot work for me nor does it gives an option of replacing existing row with same data and I don't know how to modify it ..

    There is one more thing I want the xperts help with that is I want to check the date entered in textbox2 if its previous then give error message (Basically it should not allow entry in previous date). I do have the code for this one but it is rejecting all dates of 2015 (I guess its taking format as mm/dd/yy however it should be dd/mm/yy.

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    I checked entire forum all I got was check duplicate only with 1 textbox. Any help will be appreciated. Thanks

  2. #2
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Userform to check 2 textboxes for duplicate & date check

    LadyAlina,

    for your date change, I assume the date format that is backwards is the current date (d1)? I'd suggest if you have a specific format you want that you put that into the value assignment. Even so, on my pc it did funny things with the date until I made the year 4 digits, but this was working for me:

    Please Login or Register  to view this content.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  3. #3
    Registered User
    Join Date
    03-24-2015
    Location
    India
    MS-Off Ver
    2010,2013
    Posts
    2

    Re: Userform to check 2 textboxes for duplicate & date check

    Thanks Arkadi it did work... Could you please also help me with the duplicate check solution... I'm working on it for last 2 days and couldn't find any solution...

  4. #4
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Userform to check 2 textboxes for duplicate & date check

    LadyAlina, can you post a sample workbook to look at?

+ 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 VBA to check 2 columns (A & B) for duplicate entries
    By stevebailey in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-24-2014, 04:27 AM
  2. [SOLVED] UserForm Auto Check check boxes if TextBoxes are not empies
    By MariaPap in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-12-2013, 11:36 AM
  3. Userform - check for duplicate entries
    By glynnhicks in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-16-2013, 10:48 AM
  4. Replies: 1
    Last Post: 11-29-2010, 06:56 AM
  5. check is input textboxes is numeric on userform
    By Jean-Pierre D via OfficeKB.com in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-16-2005, 04:05 PM

Tags for this Thread

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