+ Reply to Thread
Results 1 to 4 of 4

find file from a folder with highest revison--resolved

  1. #1
    Registered User
    Join Date
    12-13-2011
    Location
    farmington MI
    MS-Off Ver
    Excel 2003
    Posts
    81

    Lightbulb find file from a folder with highest revison--resolved

    Helloo all
    I have hundreadd of files in a folder and and what to get file name with highest revison number

    eg

    folder name: c:\reports

    CA08374-00-kevin files.xls
    CA08374-01-peter files budget .xls
    CA08374-02-cindy returns.xls
    CA08374-03-mary report from last month.xls

    so here i want to get file name of "CA08374-03-mary report.xls"


    thanks for help

    regards

  2. #2
    Valued Forum Contributor fredlo2010's Avatar
    Join Date
    07-04-2012
    Location
    Miami, United States
    MS-Off Ver
    Excel 365
    Posts
    762

    Re: find file from a folder with highest revison

    Hello,

    Maybe something like this

    Please Login or Register  to view this content.
    Hope it helps

  3. #3
    Registered User
    Join Date
    12-13-2011
    Location
    farmington MI
    MS-Off Ver
    Excel 2003
    Posts
    81

    Re: find file from a folder with highest revison

    thanks fredlo,

    that is working great.
    could explain a bit of how code works in this case..

    looks simple and an when I try to understand I get confused.

  4. #4
    Valued Forum Contributor fredlo2010's Avatar
    Join Date
    07-04-2012
    Location
    Miami, United States
    MS-Off Ver
    Excel 365
    Posts
    762

    Re: find file from a folder with highest revison--resolved

    Hi var,

    I am sorry I took so long to reply; I am been kinda busy today.

    I have commented the code more. I hope it makes thing clearer for you. Basically the code is saying: Give me all the files that match a specific pattern; along the away always hold a value (ret). Compare the latest file you got with the one you are holding; if the new one is greater than the one you are holding then drop it and hold the new one.

    Please Login or Register  to view this content.
    Hope this helps

+ 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] VBA to search folder contents for xlsm with highest file number
    By Rerock in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-20-2014, 03:08 PM
  2. Replies: 4
    Last Post: 10-17-2014, 09:31 AM
  3. Replies: 4
    Last Post: 04-21-2013, 01:09 PM
  4. [SOLVED] Find the Highest Numberd File in a Folder
    By D.L. in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-11-2013, 05:41 PM
  5. Find File in Directory(s) and Open Folder highlighting file
    By cpadude in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-08-2010, 05:39 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