+ Reply to Thread
Results 1 to 2 of 2

How To keep Columns when Using a Macro to automatically save a .csv file

  1. #1
    Registered User
    Join Date
    08-31-2012
    Location
    wisconsin,us
    MS-Off Ver
    Excel 2010
    Posts
    1

    How To keep Columns when Using a Macro to automatically save a .csv file

    I'm using a Macro that when activated saves a file as a .csv (MS-DOS) file. When saving it automatically it saves all information to Column A with a comma delimter. When you save the .csv (MS-DOS) file manually it prompts you with an "Error Message" . ".csv may contain features that are not compatible with CSV (MS-DOS). Do you want to keep the workbook in this format? When you click Yes the file is saved with all of the columns retained. This is what I want, but within a Macro.

    *Plain and simple - Current Macro saves automatically as a .csv file with all data in column A seperated by commas (Correct I know)

    Issue: I used these .CSV (MS-DOS) files to import data into our ERP system, the ERP reads the information Column specific so the correct data has to be in the correct format. Only .CSV (MS-DOS) file can be imported.

    **I'm wondering what about that "Error Message" Prompt and Clicking Yes retains all of the column locations within the .CSV File? And how can I get this to do the same in my VBA Code.

    Any help is greatly appreciated - I've been stumped on this for a month now.

    Code:

    Please Login or Register  to view this content.
    Thanks,

    Jon
    Last edited by Cutter; 08-31-2012 at 10:24 PM. Reason: Added code tags

  2. #2
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: How To keep Columns when Using a Macro to automatically save a .csv file

    @ JonTtrier

    Welcome to the forum.

    Please notice that code tags have been added to your post(s). The forum rules require them so please keep that in mind and add them yourself whenever showing code in any of your future posts. To see instructions for applying them, click on the Forum Rules button at top of the page and read Rule #3.
    Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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