+ Reply to Thread
Results 1 to 2 of 2

need to open latest excel workbook automatically

  1. #1
    Registered User
    Join Date
    05-04-2015
    Location
    Irvine, CA
    MS-Off Ver
    2010
    Posts
    37

    need to open latest excel workbook automatically

    I have been using the following code successfully for a while now. Upon activation of macro, the program prompts the user to open an excel file , with the specific folder path already open. From there, the user double clicks (opens) the selected file and the programming continues. However, I would like to modify it slightly so the user DOES NOT have to select his/her own file, but Excel will just automatically find the newest file with "Date Last Modified" (usually the first file on top in my share drive) upon activation. Can anyone assist me? It seems relatively simple but couldn't get any short and concise responses online.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,641

    Re: need to open latest excel workbook automatically

    Hi there,

    Try the following code and see if it does what you need:

    Please Login or Register  to view this content.
    The highlighted value can be changed to suit your requirements.

    The above routine will open the file most recently modified in the specified folder. It assumes that the most recently modified files in the folder will always be Excel workbooks.

    Hope this helps - please let me know how you get on.

    Regards,

    Greg M
    Last edited by Greg M; 09-11-2015 at 04:32 PM. Reason: Minor addition

+ 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. Replies: 3
    Last Post: 07-12-2014, 06:04 AM
  2. Replies: 2
    Last Post: 03-09-2014, 01:38 PM
  3. Replies: 3
    Last Post: 03-09-2014, 01:37 PM
  4. [SOLVED] Automatically open the latest date modified excel file in a folder
    By arleutwyler in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-17-2014, 01:35 PM
  5. Replies: 9
    Last Post: 11-28-2013, 05:20 PM
  6. How to open the Excel sheet with latest date
    By vijayvarshan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-27-2013, 06:30 AM
  7. How To Automatically Open New Workbook After 1st Workbook Open 4 Seconds
    By Launchnet in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 11-09-2009, 12:55 AM
  8. Open Latest TextFile with latest TimeStamp
    By pr4t3ek in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-03-2009, 10:03 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