+ Reply to Thread
Results 1 to 2 of 2

Excel's TODAY different result from VBA xlDateToday

  1. #1
    Registered User
    Join Date
    12-27-2016
    Location
    Ontario, Canada
    MS-Off Ver
    2010
    Posts
    34

    Excel's TODAY different result from VBA xlDateToday

    What I wanted to do is pickup today's date in VBA. But when I tried the below code I got 2/6/1900. However if I do =TODAY() in a worksheet it gives the proper date of 1/21/2017.

    All I want is to do is set today's date to a variable and got a strange result. What am I doing wrong?

    Please Login or Register  to view this content.

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Excel's TODAY different result from VBA xlDateToday

    Use

    Please Login or Register  to view this content.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

+ 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] Future Date - TODAY() : not giving expected result
    By Psycho_uk in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-08-2013, 04:37 AM
  2. Hpw to display result if date is prior to today
    By aliceinnz in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-07-2013, 06:58 PM
  3. Replies: 5
    Last Post: 05-29-2012, 01:33 PM
  4. Replies: 3
    Last Post: 12-11-2007, 01:36 PM
  5. excel result return wrong calcuation result
    By garyww in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-14-2006, 06:20 AM
  6. How to make the Result of a TODAY Function static?
    By kscramm in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 03-23-2006, 04:20 AM
  7. Replies: 0
    Last Post: 03-15-2006, 09:40 PM
  8. Lookup and compare to (today) + time and get result
    By matteo in forum Excel General
    Replies: 0
    Last Post: 06-16-2005, 02:43 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