+ Reply to Thread
Results 1 to 14 of 14

show messagebox on duplicate date

  1. #1
    Registered User
    Join Date
    03-10-2017
    Location
    Holland
    MS-Off Ver
    Office 2016
    Posts
    14

    show messagebox on duplicate date

    Hee everyone,


    i have this working userform

    Please Login or Register  to view this content.
    but now i want a messagebox to popup when there is a duplicate date entry
    and a messagebox when the date entry went successful

    could somebody show me the way?

    thx in advance

  2. #2
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    15,026

    Re: show messagebox on duplicate date

    Hi Spoeser

    What must be date entry i.e. Me.DTPicker1.Value be compared to to see if there is a duplicate.
    Good Luck...
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
    Also....Add a comment if you like!!!!
    And remember...Mark Thread as Solved...
    Excel Forum Rocks!!!

  3. #3
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    15,026

    Re: show messagebox on duplicate date

    Something like this

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    03-10-2017
    Location
    Holland
    MS-Off Ver
    Office 2016
    Posts
    14

    Re: show messagebox on duplicate date

    hee sintek

    the DTPicker1.Value is a datestamp i.e. 01-04-2017

    i want a messagebox to popup when i already have a value on that day
    does that make sense

    thx in advance

  5. #5
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    15,026

    Re: show messagebox on duplicate date

    Hi Spoeser

    Not sure what you mean
    i already have a value on that day
    What are we comparing to.....Where would the date value be indicated to make the check. Would it be in the date column on the row before lastrow?

  6. #6
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    15,026

    Re: show messagebox on duplicate date

    If That is the case then this will work
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    03-10-2017
    Location
    Holland
    MS-Off Ver
    Office 2016
    Posts
    14

    Re: show messagebox on duplicate date

    im sorry for the bad discription but i have a hard time to explain my issue

    that last code almost worked for me, but i tested it more and found that its not.

    as you can see below there is a duplicate date in column E (13-04-2017) and it still says "Date entry succesful"




    messagebox.jpg


    i also want when there is a duplicate date the session is closed after the "Duplicate Date" msgbox and no data is saved from the userform.

    is this possible??

    thx in advance

  8. #8
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: show messagebox on duplicate date

    Naand Spoeser,

    Please could you attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate.

    Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

    Baie Dankie.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  9. #9
    Registered User
    Join Date
    03-10-2017
    Location
    Holland
    MS-Off Ver
    Office 2016
    Posts
    14

    Re: show messagebox on duplicate date

    i have atteched a sample of my userform.

    also 2 pictures of how the situation is right now and how i whould like it to be

    i hope this make sense with the rest of my story above

    thx guys
    Attached Images Attached Images
    Attached Files Attached Files

  10. #10
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MSO Home and Business 2024
    Posts
    7,522

    Re: show messagebox on duplicate date

    Try this one.

    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  11. #11
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    15,026

    Re: show messagebox on duplicate date

    @bakerman2

    Nice one

  12. #12
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: show messagebox on duplicate date

    My machine runs with Windows 7 Office 2010, and I don't have DTPicker available.

  13. #13
    Registered User
    Join Date
    03-10-2017
    Location
    Holland
    MS-Off Ver
    Office 2016
    Posts
    14

    Re: show messagebox on duplicate date

    Quote Originally Posted by bakerman2 View Post
    Try this one.

    Please Login or Register  to view this content.
    This was what i was looking for

    thx Bakerman2

  14. #14
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MSO Home and Business 2024
    Posts
    7,522

    Re: show messagebox on duplicate date

    You're welcome and thanks for 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. [SOLVED] How do you show duplicate dates on spreadsheets
    By Double G in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-15-2016, 09:53 PM
  2. If duplicate value then messagebox
    By jumbla in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-19-2015, 05:19 AM
  3. Show Range of Data in messagebox with columnwidth
    By naveenmarapaka in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-17-2014, 05:53 AM
  4. [SOLVED] Duplicates checker - with messagebox listing duplicate results
    By Gti182 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-18-2014, 05:52 AM
  5. Replies: 2
    Last Post: 02-24-2014, 08:20 PM
  6. Date formula if positive show, if negative don't show.
    By Cyberpawz in forum Excel General
    Replies: 8
    Last Post: 03-14-2012, 07:49 AM
  7. Replies: 3
    Last Post: 03-25-2006, 12:25 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