+ Reply to Thread
Results 1 to 2 of 2

Run Macro On Multiple Closed Workbooks

  1. #1
    Andy
    Guest

    Run Macro On Multiple Closed Workbooks

    I have a file named Master.xls with a list of numbers in col A that refer to
    the names of thousands of text (nnnnnnn.log) files in the same folder as
    Master.xls.
    I have a macro to extract the data that I need from the log file (when I
    open the log file in Excel), format and tabulate the data ready to export to
    a databse, but, but I do not relish the thought of having to repeat the
    process of open file, run macro, close file thousands of times.
    Can anyone suggest how i could run this macro for each nnnnnn.log file
    listed in col A of Master.xls ?
    I'm sure the answer is pretty simple but then so am I!

  2. #2
    Walt
    Guest

    Re: Run Macro On Multiple Closed Workbooks

    Hi Andy,

    There's a good example of the DIR Function in the VBA help system.
    Within the loop described, you can test against your listing and open &
    process where appropriate. I think it will get you there.

    Best Regards,
    Walt Weber


+ 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