+ Reply to Thread
Results 1 to 2 of 2

VBA to copy multiples txt file saved in the same folder

  1. #1
    Registered User
    Join Date
    09-16-2011
    Location
    Hong Kong
    MS-Off Ver
    Excel 2003
    Posts
    52

    Question VBA to copy multiples txt file saved in the same folder

    I searched from the net and found below code that can copy multiple files saved in the same folder. I tried to use it to copy some txt files and came across with some problem. Please see below the example of one these txt files.

    Invoice Voucher Transaction Text Due Amount Currency
    H-00001 ICINV-00001 400000045R1 4/21/12 3,390

    If I manually copied and paste the data to an excel spreadsheet, the data will go to separate column as follows.

    Column 1, Column 2, Column 3, Column 4, Column 5
    Invoice, Voucher, Transaction Text, Due, Amount Currency
    H-00001, ICINV-00001, 400000045 R1, 4/21/12, 3,390


    But if copying with the following code, the data pasted on the excel spreadsheet will become the following.

    Column 1
    InvoiceVoucherTransactionTextDueAmountCurrency
    H-00001ICINV-00001400000045R14/21/123,390

    Can anyone advise how to amend the code below so that the data pasted on the spreadsheet can appear as those copied and pasted manually to the spreadsheet?

    Please Login or Register  to view this content.
    Last edited by alexxgalaxy; 02-04-2013 at 06:47 PM.

  2. #2
    Registered User
    Join Date
    09-16-2011
    Location
    Hong Kong
    MS-Off Ver
    Excel 2003
    Posts
    52

    Re: VBA to copy multiples txt file saved in the same folder

    Can anyone give me a hand?

+ 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