+ Reply to Thread
Results 1 to 3 of 3

Import CSV with VBA code fails on 2nd import

  1. #1
    Registered User
    Join Date
    04-02-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    2

    Import CSV with VBA code fails on 2nd import

    I have VBA importing multiple CSV files onto a Sheet using the code below.

    It works on the 1st CSV file imported, but any subsequent files it loads in one column only. The CSV file is ok, since it imports properly manually using Excel's dialog box for importing CSV files.

    Is there a reason why it fails in VBA?

    Thanks,
    Ron
    Here's the code for importing...
    Please Login or Register  to view this content.
    Last edited by vlady; 04-02-2013 at 10:57 PM. Reason: code tags

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Import CSV with VBA code fails on 2nd import

    Try this code
    Please Login or Register  to view this content.
    If solved remember to mark Thread as solved

  3. #3
    Registered User
    Join Date
    04-02-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Import CSV with VBA code fails on 2nd import

    Thanks for the feedback, Patel.

    Actually, I resolved this problem with a change to: .TextFileTabDelimiter = True (from false). I noticed this on the the Import dialog box.

+ 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