+ Reply to Thread
Results 1 to 5 of 5

Open multiple files

  1. #1
    Forum Contributor Bob@Sun's Avatar
    Join Date
    09-03-2009
    Location
    Montuak, Usa
    MS-Off Ver
    Excel 2007
    Posts
    438

    Open multiple files

    Hello,

    In a folder I have multiple files. All of them are with the same name but with a date stamp.
    For example: Test_20100419

    How can i open via macro all the files for the month of April located in this folder?
    Last edited by Bob@Sun; 04-21-2010 at 04:56 AM.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    Re: Open multiple files

    You should be able to use the DIR function.

    Please Login or Register  to view this content.
    Initially this will output valid files to the debug window.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Contributor Bob@Sun's Avatar
    Join Date
    09-03-2009
    Location
    Montuak, Usa
    MS-Off Ver
    Excel 2007
    Posts
    438

    Re: Open multiple files

    It is not working properly.

    strFilename does not get any value?

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    Re: Open multiple files

    Can I assume you modified the folder used in the variable strPath?

    If yes start by altering the text used to see if any files are reported.

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor Bob@Sun's Avatar
    Join Date
    09-03-2009
    Location
    Montuak, Usa
    MS-Off Ver
    Excel 2007
    Posts
    438

    Re: Open multiple files

    The problem was that I did not add "\" at the end of the path.

    The code is working great.

    Thanks!

+ Reply to Thread

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