Results 1 to 4 of 4

Open file path from cell, paste into new sheet named from another cell and loop

Threaded View

  1. #1
    Registered User
    Join Date
    05-30-2014
    Posts
    11

    Open file path from cell, paste into new sheet named from another cell and loop

    Hi,

    I'm a fairly basic user of VBA and have found this forum enormously useful over the years. Invariably there's already some code posted somewhere that I can find and modify to suit my needs, but this time I'm drawing a blank.

    I need some VBA code to open a text file (they are text files with a *.WTS suffix, but they are text files and excel can open/import/read them no problem) and paste the contents of that text file into a new work sheet in the workbook and then loop through 225 files listed in the worksheet. I currently have a sheet in a workbook in which column A contains all of the file paths for all the files and column B contains the corresponding sheet name which I would like to apply to a new sheet into which the contents of each txt file are pasted.

    I imagine this is pretty simple stuff - but I'm hitting a complete block trying to get something that even begins to work. Could anyone lend a hand?
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Trying to populate a cell with a file path within a loop
    By Groovicles in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-22-2016, 03:20 PM
  2. Open a Text File that is named in another cell, copy and paste all in another tab
    By Bobbbo in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-17-2016, 04:16 PM
  3. Open from dialog box to insert file path and name into cell
    By D_Rennie in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-13-2012, 02:29 AM
  4. [SOLVED] open variably named file, copy/paste data into consolidation file, open next file in list
    By sllawrence1968 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-29-2012, 09:49 PM
  5. [SOLVED] VBA - Open Excel Files with file path from Named Ranges
    By bbg22 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-06-2012, 11:41 PM
  6. Open File which path is in a cell
    By Bishonen in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-30-2012, 07:54 AM
  7. How do I open a file from a named cell?
    By Cumberland in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-23-2006, 04:15 AM

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