Results 1 to 59 of 59

VB code Get 2 latest file names from Directory

Threaded View

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    VB code Get 2 latest file names from Directory

    Hello:

    Please refer to attached file.

    I have check box in column A cell I1:I2 and the result for check box is in cell I1:I2 as TRUE OR FALSE.

    If I1 or i2 is TRUE then I need to fetch the 2 latest file name from directory as shown in K1:K2.

    Example:
    I have lots of file in C:\Store1\.
    If I1 is TRUE then need to go to the directory C:\Store1\ and get 2 newest file and put the file name in L1 and M1
    If I2 is TRUE then need to go to the directory C:\Store2\ and get 2 newest file and put the file name in L2 and M2

    Let me know if you have any questions.
    Thanks.

    Riz
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 9
    Last Post: 11-28-2013, 05:20 PM
  2. Need VBA code to search file in directory and sub-directory and show result
    By johnchencanada in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-19-2012, 11:13 PM
  3. [SOLVED] Reading in files from directory......does this code also alphabetize the file names
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-24-2012, 08:20 AM
  4. Import file size and file names from a directory
    By zahid in forum Excel General
    Replies: 1
    Last Post: 02-07-2006, 09:35 AM
  5. Getting file names in a directory
    By John in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-08-2005, 12:06 PM

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