+ Reply to Thread
Results 1 to 2 of 2

VBA Opening latest file (Multiple same name)

  1. #1
    Forum Contributor
    Join Date
    08-22-2013
    Location
    Sheffield
    MS-Off Ver
    Excel 2010
    Posts
    161

    VBA Opening latest file (Multiple same name)

    Hi all,

    I've written some code that looks at a specific file in a folder, which all works fine... but i want it to open the latest one, the below currently opens the first one of that day

    Please Login or Register  to view this content.
    ***FileStructure - PunchDataExport_20200124_07**** <- 2 digits after the _ is the hour

    I know I've added the "*", it does the same thing without it... The files aren't at specific times either, but it does run everyday

    Any one got any ideas?

    Thanks!
    Last edited by jsneak; 01-24-2020 at 03:04 PM.

  2. #2
    Registered User
    Join Date
    05-26-2014
    Posts
    49

    Re: VBA Opening latest file (Multiple same name)

    Sort the filenames in an array including the time of day and pick up the latest one out of the array

+ 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. Opening a file to the latest entry
    By sebc1985 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-27-2019, 08:29 AM
  2. Opening latest version of a .txt file in Excel using VBA
    By lloydie8 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-07-2017, 06:04 AM
  3. [SOLVED] Opening latest revision of a file via URL(http://..)
    By plasmas222 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-17-2015, 03:17 PM
  4. Macro opening latest saved file
    By WillemB in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-01-2014, 04:57 AM
  5. Replies: 9
    Last Post: 11-28-2013, 05:20 PM
  6. Replies: 22
    Last Post: 12-11-2012, 12:43 PM
  7. Opening the latest file
    By jomili in forum Excel Programming / VBA / Macros
    Replies: 24
    Last Post: 07-20-2012, 10:15 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