+ Reply to Thread
Results 1 to 4 of 4

What's up with Fx FileDateTime?

  1. #1
    Registered User
    Join Date
    04-06-2017
    Location
    Blaine, Wa
    MS-Off Ver
    2016
    Posts
    1

    Unhappy What's up with Fx FileDateTime?

    I want to make an up-to-date list with Excel of file names in a specific directory. They are stories. Another person is monitoring my progress.
    Columns are: Last-Modified-Date, File-Name, Pct-Complete and Issues. I have added comments to most of the names' cells and hyperlinked them to the actual files.
    Problem: I hoped to use Fx FileDateTime("full path name") in each cell of the Last Modified Field to keep that field up to date.

    Despite all kinds of examples and praise for that VBA function, it simply doesn't work; all I get is #NAME.
    What is going on?

  2. #2
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: What's up with Fx FileDateTime?

    Welcome to the forum
    They are stories. Another person is monitoring my progress. - sounds like something out of a spy movie!
    Moaning without a full explanation will not usually get you the answer
    What is going on? = probably a minor error in your code
    it simply doesn't work - it's rather difficult to help if you do not provide us with the code that fails to deliver what you expect

    Try this code, which works - modify the value for variable myfolder
    Add a worksheet named "List" to your workbook (this is where the list of files is placed)

    Perhaps this is not exactly what you want - if it isn't, please attach a workbook which shows exactly what you do want and how you want it to update etc
    (click on Reply/ Go Advanced / look below for Manage Attachments and follow the instructions on the screen)

    Amend the code to get what you want, and if your code does not work - post it (enclosed in code tags - select the code and click on # icon above)

    Place this in a general module:
    Please Login or Register  to view this content.
    And this takes things down another level:
    Please Login or Register  to view this content.
    Last edited by kev_; 04-07-2017 at 03:46 AM.
    Click *Add Reputation to thank those who helped you. Ask if anything is not clear

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,086

    Re: What's up with Fx FileDateTime?

    Looks to me as though you use the function in VBA, not directly on the worksheet. I guess you'd need a UDF wrapper to call it from a cell.

    https://www.techonthenet.com/excel/f...ledatetime.php
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: What's up with Fx FileDateTime?

    This will update FileDateTime values when workbook is opened

    In the ThisWorkbook module
    Please Login or Register  to view this content.
    In general module
    Please Login or Register  to view this content.
    Last edited by kev_; 04-07-2017 at 09:47 AM.

+ 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] File not found in FileDateTime Function
    By nosense in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-09-2022, 05:19 PM
  2. FileDateTime for a file at an ftp location
    By Nwanda in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-23-2014, 02:40 AM
  3. FileDateTime function - how to make it authomatic?
    By bondcrash in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-21-2006, 09:55 AM
  4. Put only date (not time too) in variable from FileDateTime function
    By mikeburg in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-22-2006, 02:10 AM
  5. [SOLVED] FileDateTime for Internet web page
    By Mogwai in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-02-2005, 05:05 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