+ Reply to Thread
Results 1 to 5 of 5

Macro to load text file not working.

  1. #1
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    440

    Macro to load text file not working.

    Hi,

    I need to load a text file into an excel, but to paste all only in the column A and not having to split them out to other column.

    Here are the sample files:
    HELP.xlsm
    HELP.txt

    If anyone can tell me where is wrong?

    Thanks.
    Last edited by Leith Ross; 03-14-2014 at 05:01 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: Macro to load text file not working.

    Hi..

    Try this.. change the file path to suit..

    Please Login or Register  to view this content.
    or this with a File Browser Dialogue..
    Please Login or Register  to view this content.
    Last edited by apo; 03-14-2014 at 07:39 PM.

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,588

    Re: Macro to load text file not working.

    Try change
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    440

    Re: Macro to load text file not working.

    The final code is:
    Please Login or Register  to view this content.
    But how can I mod so if they cancel and dont load any file, it will prompt a message saying, you did not select any file?

    Thanks.

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,588

    Re: Macro to load text file not working.

    Try change
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.

+ 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. [SOLVED] Macro Working fine until last line of text file
    By masond3 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-17-2014, 12:10 PM
  2. VBA Importing Text File makes the file longer to load everytime
    By Hudas in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-15-2014, 11:26 AM
  3. How to load macro file Automatically in Excel
    By dalipsinghbisht in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-08-2013, 08:07 AM
  4. Opening a browse and load file box in a macro
    By Scott Calkins via OfficeKB.com in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-25-2005, 05:56 PM
  5. Replies: 0
    Last Post: 04-18-2005, 09:06 PM

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