+ Reply to Thread
Results 1 to 3 of 3

FileDateTime - referencing THISworkbook not ACTIVEworkbook

  1. #1
    Registered User
    Join Date
    11-14-2013
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    96

    FileDateTime - referencing THISworkbook not ACTIVEworkbook

    Hello!

    Im trying to get the 'last modified/created' time/date from a file i'm opening, but it keeps referencing the Macro workbook's date/time info instead.
    Basically, its set up to allow the user to select their file from their folder... followed by this (which all works, except for FileDateTime()

    Please Login or Register  to view this content.
    ....so im confused why "activeworkbook' is working for everything else except my FileDateTime() ??? Thanks in advance!

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: FileDateTime - referencing THISworkbook not ACTIVEworkbook

    You need the file name, not just the path. Perhaps use FileDateTime(FName) instead.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Registered User
    Join Date
    11-14-2013
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    96

    Re: FileDateTime - referencing THISworkbook not ACTIVEworkbook

    oh geez, that was it. it made sense immediately when you pointed it out. THANK YOU VERY MUCH!

+ 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. What's up with Fx FileDateTime?
    By usrtom1 in forum Office 365
    Replies: 3
    Last Post: 04-07-2017, 09:39 AM
  2. Loop - if cell value in activeworkbook > cell value in thisworkbook
    By VBA FTW in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-10-2013, 02:46 AM
  3. Copy from Array in ActiveWorkbook to ThisWorkbook; Transpose copy, Offset Paste
    By sbradley in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-14-2013, 05:17 PM
  4. Referencing ActiveWorkbook in a formula?
    By Strife in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-12-2011, 04:30 PM
  5. using activeworkbook and thisworkbook.
    By D_Rennie in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-03-2009, 10:41 AM
  6. ThisWorkbook/ActiveWorkbook
    By John Keith in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-08-2006, 06:35 PM
  7. [SOLVED] ThisWorkbook vs. ActiveWorkbook?
    By JK in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-19-2005, 03:06 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