+ Reply to Thread
Results 1 to 3 of 3

Calculate the number days between two user input days.

  1. #1
    Valued Forum Contributor
    Join Date
    11-20-2003
    MS-Off Ver
    2010, 2016
    Posts
    1,139

    Calculate the number days between two user input days.

    I'm trying to calculate the number of days between two days that the user inputs via a message box. I'm having trouble with the calculation between the two dates. I've tried to declare the variable as Long and also as Variant but neither is working. Thanks in advance for any comments
    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Calculate the number days between two user input days.

    Hi,

    Try declaring them as "Date", and also add these lines of code in before asking if the dates are correct:
    Please Login or Register  to view this content.
    Hope this helps

  3. #3
    Valued Forum Contributor
    Join Date
    11-20-2003
    MS-Off Ver
    2010, 2016
    Posts
    1,139

    Re: Calculate the number days between two user input days.

    This works. Thanks

+ 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. Calculate total working days and excepted leave days
    By megaiooo in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-21-2013, 09:29 AM
  2. Calculate vacation days taken or partial days
    By chris1965 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-20-2013, 07:18 PM
  3. [SOLVED] Calculate number of days between two days
    By hecgroups in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-03-2012, 11:28 AM
  4. How to calculate number of days?
    By Maria Reed in forum Excel General
    Replies: 2
    Last Post: 07-28-2011, 04:31 PM
  5. calculate business days(where there is 6 days a week)
    By arnab0711 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-09-2011, 10:09 AM

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