+ Reply to Thread
Results 1 to 4 of 4

How to process multiple open files with a macro

  1. #1
    Registered User
    Join Date
    07-22-2008
    Location
    UK
    Posts
    2

    How to process multiple open files with a macro

    Hi all,

    I have some 100 files to process, using this macro:

    Please Login or Register  to view this content.


    it copies unique values from col A in an open file to a new file (book3). I can do this manually file by file and it appends values in the new file.

    Is there a way to open the 100 files in excel and run the macro (with some modification) so it traverse thru the opened files one by one automatically and does this?

    Someting like a for loop, may be?

    Thanks,
    Vasil
    Last edited by rylo; 07-22-2008 at 09:41 PM.

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    Can you please review the forum rules regarding wrapping code. I've edited your post for you this time.


    Are all the files in the same directory as the workbook that contains the macro? If not, then where are the files to be opened, and are all the files to be actioned?

    rylo

  3. #3
    Registered User
    Join Date
    07-22-2008
    Location
    UK
    Posts
    2
    Quote Originally Posted by rylo
    Hi

    Can you please review the forum rules regarding wrapping code. I've edited your post for you this time.


    Are all the files in the same directory as the workbook that contains the macro? If not, then where are the files to be opened, and are all the files to be actioned?

    rylo
    Hi there, sorry for this with the code.

    Yeah all files are in same folder. All the files in the folder should be actioned.

    Thanks

  4. #4
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    Didnt' test this, but put the code below into a new workbook, and save it in the relevant directory with the files to action.

    Then run the code. It should create a new output file, and copy the unique entries to that file.

    Please Login or Register  to view this content.
    rylo

+ 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