+ Reply to Thread
Results 1 to 8 of 8

help fix dateadd into ditpicker on userform

  1. #1
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    734

    help fix dateadd into ditpicker on userform

    hi, all

    i need help about account date by dateadd into textbox on userform i have two datepicker when i add days and months and years to dtpicker1 it should show a new date in dtpicker2 so dtpicker1 based on textbox3,4,5 after write first data and end date then account old the problem it gives me wrong a new date for instance first date=15/05/2010 end date= 1/1/2011 days=231 months=8 years=1
    a new date in dtpicker1 = 11/04/2020 it gives me this data in a new date datpicker=11/04/2021 it supposes = 28/12/2021 but it gives me wrong date an error by the way i crossed post in this forum nobody answers me so far
    https://www.mrexcel.com/board/thread...rform.1134989/

    and this is my code about dateadd

    HTML Code: 
    Attached Files Attached Files
    Last edited by ABDELFATTA; 05-24-2020 at 07:17 AM.

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: help fix dateadd into ditpicker on userform

    Duplicated post.

    Please also mark the other question, which is unansered as solved.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    734

    Re: help fix dateadd into ditpicker on userform

    what you mean Duplicated post. i don't issue the same post in earlier if you mean i issued this question before and if you mean somebody issued the same topic i will change it

  4. #4
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,304

    Re: help fix dateadd into ditpicker on userform

    The reason you are seeing what you believe to be the wrong date is because you are overwriting the datediff.
    datediff does not enable you to write individual days - months -years you will have to do one only.
    I have blanked out your datediff month & year, you will see if you allow only days it is accurate, then blank datediff days and try months by itself that works and so does years.
    Although I fail to see the point of the excercise
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    734

    Re: help fix dateadd into ditpicker on userform

    hi, torchan i know this way you're right about choose one case day or month or year then gives me right value but i search code do that together and you misunderstood it supposes showing the result in dtpicker2 after choose the date from dtpicker1

  6. #6
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    734

    Re: help fix dateadd into ditpicker on userform

    any help please

  7. #7
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    734

    Re: help fix dateadd into ditpicker on userform

    no answering so far
    Last edited by ABDELFATTA; 05-25-2020 at 04:38 AM.

  8. #8
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    734

    Re: help fix dateadd into ditpicker on userform


+ 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] Userform - Multiple Criterias (Textbox, Combobox) Return Value in textbox
    By givemeaccessexcel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-02-2018, 09:25 PM
  2. [SOLVED] Excel 2010 - Userform - display date from textbox in a label or textbox in 'ddd' format
    By theshybutterfly in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-29-2015, 10:54 PM
  3. Replies: 23
    Last Post: 07-12-2014, 07:09 PM
  4. Userform to search textbox value to place other textbox values in worksheet
    By mattyh555 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-19-2012, 11:38 AM
  5. Replies: 3
    Last Post: 05-07-2012, 09:46 PM
  6. Userform Textbox updating a another userform textbox (im stuck!!)
    By wapwap in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-31-2011, 02:56 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