+ Reply to Thread
Results 1 to 4 of 4

open certain files in a loop

  1. #1
    Forum Contributor
    Join Date
    02-23-2015
    Location
    Sweden
    MS-Off Ver
    2013
    Posts
    109

    open certain files in a loop

    Hi guys,

    I need to open certain files in a folder


    Could someone help me with script that looping a folder,

    I select files from a dialogwindow and then open following files:

    UCHP_Translation2_jeeves.xls
    UCHP_Translation2_UCHPResourcesCampaign.xls
    UCHP_Translation2_UCHPResourcesCrediting.xls



    See picture to see which files the script will not open.

    mDvApT3.png



    Could someone help me ?

    Thank you in advance.

  2. #2
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: open certain files in a loop

    try this

    Please Login or Register  to view this content.
    Regards
    Sean

    Please add to my reputation if you think i helped
    (click on the star below the post)
    Mark threads as "Solved" if you have your answer
    (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code:
    [code] Your code here [code]
    Please supply a workbook containing example Data:
    It makes its easier to answer your problem & saves time!

  3. #3
    Forum Contributor
    Join Date
    02-23-2015
    Location
    Sweden
    MS-Off Ver
    2013
    Posts
    109

    Re: open certain files in a loop

    the problem is sean,

    the filename can be anything.

  4. #4
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: open certain files in a loop

    Hi
    your original question was how to loop through a folder and only open certain files.
    thats what this code does.
    What exactly do you require?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. macro to open files and copy specific sheet into new workbook (have open files part)
    By dangerdavedsp in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-04-2015, 02:23 PM
  2. Open multiple files and copy data is slow, code after end of loop not working - help?
    By hadamhiram in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-16-2014, 11:52 PM
  3. Detect attempt to switch between open excel files (windows) during loop
    By lahansen2 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-02-2014, 03:10 PM
  4. Need help with a loop statement to open html files
    By Praetox in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-22-2013, 12:25 AM
  5. Loop to open excel files in a folder
    By elmarko123 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 06-02-2010, 12:58 PM

Tags for this Thread

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