Consulting

Results 1 to 2 of 2

Thread: Open files with wildcards

  1. #1
    VBAX Regular
    Joined
    Dec 2007
    Posts
    26
    Location

    Open files with wildcards

    I am running Excel 2007. I am trying to open some files using a wildcard. I have a folder and five subfolders and in these five subfolders I have a file in each of these five subfolders. The wildcard file would look like this "finishedresults*". I tried application.filesearch, but I don't think Excel 2007 support that object anymore. Any other ideas? Thanks.

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    No, but it supporst Dir, and that is similar

    Dir "C:\test\finishedresults*.xls"

    Doesn't do sub-directories though, so if you know their names, you will need to handle each.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •