Results 1 to 3 of 3
  1. #1
    Chaser is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Oct 2017
    Posts
    9

    Import 4 Different Excel Files from One Folder


    Would someone please remind me how to import an excel file that's located in a folder that has a different name each day.


    I have to import 4 different excel files each day.
    Each day the file names are different, except for one word in the file name (Work, Home, Time)
    Becuase in the past the files have been manually opened then modified and resaved in the same folder, there are hundreds of these types of excel files, but I only need the ones created the same day.


    What would be the easiest way for me to import these files while but clicking a button or hitting run also using the system date for today's date? Macro or VBA


    Thank you for your help

  2. #2
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Check out the FileDateTime function in help.

    You could loop through all of the files in a directory, check the file created/modified date, if it matches, add to an array.
    Once you have the file names that match the date, loop through the array, importing each spreadsheet.



    Found these:
    http://www.msofficeforums.com/excel-...using-vba.html
    http://software-solutions-online.com...n-a-directory/

  3. #3
    Chaser is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Oct 2017
    Posts
    9
    Thanks, Steve - This one sounds a little above my ability

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 12-04-2015, 08:30 AM
  2. Replies: 10
    Last Post: 06-16-2014, 08:37 AM
  3. Import all excel docs in a folder into access with VBA?
    By snipe in forum Import/Export Data
    Replies: 3
    Last Post: 05-09-2014, 01:58 PM
  4. Replies: 3
    Last Post: 03-06-2014, 03:53 PM
  5. Replies: 17
    Last Post: 06-04-2013, 07:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums