Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Importing multiple text files.

  1. #1
    New Member
    Join Date
    Mar 2002
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I have a series of text files that I would like to import on a daily basis into a workbook. Using VBA, I can set this up with a static filename, but the filename contains the current date, and when I attempt to open multiple files using wildcards, only the first one will open. (I'm not even sure the wildcard approach is the correct one):

    Workbooks.OpenText FileName:="C:Loc*.loc",

    Is there a loop I can set up that would handle this? I'm sure there is, but my skills in VBA are a little too meager.

    In addition I'd like the source files to be deleted after they are imported.

    Thanks all!


  2. #2
    Board Regular
    Join Date
    Mar 2002
    Location
    =ActiveCell.Address
    Posts
    478
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Have a look at a post I made earlier, may help...

    "Way to many Spead Sheets"

    http://www.mrexcel.com/board/viewtop...c=1428&forum=2

    Regards
    AJ

  3. #3
    New Member
    Join Date
    Mar 2002
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    After a little tweaking, this looks good. Thanks!

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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