+ Reply to Thread
Results 1 to 3 of 3

VBA to import text file into excel

  1. #1
    Forum Contributor
    Join Date
    06-17-2010
    Location
    Leicester
    MS-Off Ver
    Excel 2010
    Posts
    119

    VBA to import text file into excel

    Hi,

    I would like a macro that opens up File>Open and allows me to search for a file, then imports this data from the text file.

    The data in the text file lots of rows, that will be in a1, b1, c1 etc...I already have a macro to format this, just would like to be able to import the data without having to copy and paste.

    Also is it possible, when File>Open pops up on screen to open in a particular folder, ie c:\temp?

    Thanks

  2. #2
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: VBA to import text file into excel

    Are there any delimiters in the file (e.g. comma, space, tab)?
    Please consider:

    Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

  3. #3
    Forum Contributor
    Join Date
    06-17-2010
    Location
    Leicester
    MS-Off Ver
    Excel 2010
    Posts
    119

    Re: VBA to import text file into excel

    Example of source file attached.

    Cheers.
    Attached Files Attached Files

+ 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