+ Reply to Thread
Results 1 to 9 of 9

Limit time between two dates

  1. #1
    Forum Contributor
    Join Date
    08-20-2013
    Location
    LX
    MS-Off Ver
    Office 2019
    Posts
    164

    Limit time between two dates

    I enter a start date in column A and a exepted finish date in column B. I want to limit the time between those 2 dates to 6 week.

    Exemple:

    When I enter 01/01/2016 in column A, that the date in column B can not exced 12/02/2016. And when, that a message appear you exceed the maximum time. I know that I can do this with a formule, but I prefer a vba because so I can protect the vba with a pw. If I use the formula the operators will delete the formule and enter a new date.

    Thanks for help.

  2. #2
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Limit time between two dates

    Please Login or Register  to view this content.
    I'm interested in starting a career working with VBA, if anyone knows of any opportunities!

  3. #3
    Forum Contributor
    Join Date
    08-20-2013
    Location
    LX
    MS-Off Ver
    Office 2019
    Posts
    164

    Re: Limit time between two dates

    Hello walruseggman,

    First thanks for reply. Works great, but is there also a way to force the user to enter a date in column B? Now they can tab to the other cell an continue their entries without a due date.

    Thanks m8

  4. #4
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Limit time between two dates

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    08-20-2013
    Location
    LX
    MS-Off Ver
    Office 2019
    Posts
    164

    Re: Limit time between two dates

    Thanks m8.
    Perfect.

  6. #6
    Forum Contributor
    Join Date
    08-20-2013
    Location
    LX
    MS-Off Ver
    Office 2019
    Posts
    164

    Re: Limit time between two dates

    Hello walruseggman.
    Sorry to reopen this thread, but I have a little problem which I only discover now in the daily use. In fact when input box pops up to force a date in column B and because I live in Europe I enter the date dd/mm/yyyy and when I click ok it appears in mm/dd/yyyy. The cell is correctly formated. Is there a way to solve this?
    Thanks for your help.

  7. #7
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Limit time between two dates

    You can try this, but date formats in my experience are extremely fickle, and I'm certainly no expert on formatting them.

    If this doesn't work, I recommend starting a new thread with a title something like "Correctly formatting a date inserted from an input box". Explain the situation like you just did to me, and I would include the line of code, too. And maybe a link to this thread.

    Try this:

    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    08-20-2013
    Location
    LX
    MS-Off Ver
    Office 2019
    Posts
    164

    Re: Limit time between two dates

    Thanks for your reply.
    This don't work. It enter it in the right way dd/mm/yyyy, but it don't recognize it like a date, at least in my opinion, because it even accept dates exceeding the 6 weeks.

  9. #9
    Forum Contributor
    Join Date
    08-20-2013
    Location
    LX
    MS-Off Ver
    Office 2019
    Posts
    164

    Re: Limit time between two dates

    I marked this thread as solved. For possible solution follow this thread http://www.excelforum.com/excel-prog...ox.htmlhttp://

+ 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. Can You Limit Input to One Time?
    By dv88 in forum Excel General
    Replies: 15
    Last Post: 02-14-2014, 06:24 AM
  2. [SOLVED] command button time limit
    By shiftyspina in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-26-2013, 08:06 AM
  3. [SOLVED] Limit a graph to only a certain time period..
    By Ben1985 in forum Excel Charting & Pivots
    Replies: 7
    Last Post: 11-07-2013, 04:45 AM
  4. Solver Time Limit
    By SDruley in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-01-2011, 11:45 AM
  5. Replies: 17
    Last Post: 10-22-2010, 04:20 AM
  6. Prompt message of time limit when time is entered
    By minato in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-31-2008, 10:13 AM
  7. pivot reports - limit report to last 20 dates
    By Pivot Help in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-01-2005, 06:06 PM
  8. pivot help - limit data for last 20 dates
    By Pivot Help in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-28-2005, 12:06 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