+ Reply to Thread
Results 1 to 3 of 3

VBA SaveAs CSV files

  1. #1
    Registered User
    Join Date
    09-29-2012
    Location
    Swindon
    MS-Off Ver
    Excel 2010
    Posts
    9

    VBA SaveAs CSV files

    Hi

    I have a couple of csv files that I open, copy sepcific data and paste into an excel file. What I then need to do is save the csv files into another folder.

    I have the code below but it just saves both csv files as the same name so when it saves the second one it advises that it already exists???
    Any ideas will be most apreciated

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: VBA SaveAs CSV files

    It looks like the saveas command uses the variable "strFileName" which doesn't change as you loop through the files, maybe but the strFileName line in the do while loop:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    09-29-2012
    Location
    Swindon
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: VBA SaveAs CSV files

    Brilliant - worked a treat. Thanks very much...

+ 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