Results 1 to 3 of 3

Macro to open latest file within a folder

Threaded View

  1. #1
    Registered User
    Join Date
    12-15-2010
    Location
    Oregon, USA
    MS-Off Ver
    Excel 2007
    Posts
    48

    Macro to open latest file within a folder

    Hi Guys,
    I have case where there are excel files arranged like this within a folder. For example:-

    XA11_df01.xlsx
    XA11_df02.xlsx
    XA11_df03.xlsx
    .
    .
    XB11_df01.xlsx
    XB11_df02.xlsx
    .
    .
    YA11_df01.xlsx
    YA11_df02.xlsx
    .
    .
    YB11_df01.xlsx
    YB11_df02.xlsx
    .
    .

    All these files are located in one folder. I want to write a macro to open the latest excel files based on lastmodified date and time for each file name like XA11, XB11, YA11, YB11. I only want to do this for excel files (".xlsx") within a folder as there are other pdf files also in the folder. I want macro to open the latest file for first file name run my code on it , then open latest file for second file name and run my code on it so on.


    Any help will be highly apprecited.

    Thanks.
    Roop
    Last edited by Roop; 01-21-2011 at 10:30 PM.

Thread Information

Users Browsing this Thread

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

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