+ Reply to Thread
Results 1 to 6 of 6

Comma Seperated Values UFT-8 Save in VBA

  1. #1
    Registered User
    Join Date
    06-23-2014
    Location
    england
    MS-Off Ver
    2013
    Posts
    78

    Comma Seperated Values UFT-8 Save in VBA

    Hi All,

    Can you assist, the below macro enables a workbook to be saved as a CSV with quote values and does a great job

    However i need it to be modified to write to a Comma Seperated Values only without the quote marks. can anyone help?

    Cheers

    Please Login or Register  to view this content.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,511

    Re: Comma Seperated Values UFT-8 Save in VBA

    It looks as though you are actually putting quote marks in:

    Please Login or Register  to view this content.

    So, I would try:

    Please Login or Register  to view this content.

    However, that is totally untested.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    06-23-2014
    Location
    england
    MS-Off Ver
    2013
    Posts
    78

    Re: Comma Seperated Values UFT-8 Save in VBA

    I found the above code online, its not something I wrote! No way near talented enough for that.

    I can see the quote marks being added and tried adjusting them myself, similar to your above proposal however a debug screen just comes up when i modifiy that line and test it.

    Cheers

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,511

    Re: Comma Seperated Values UFT-8 Save in VBA

    If all you want is the Active (or only) sheet to be saved as a .csv file, you might be better off recording a macro to actually save the data as a .csv file.

    See the following thread for information: http://www.excelforum.com/excel-prog...-workbook.html

    Specifically, Post #4.

    If you just record a macro while you save the active sheet as a .csv file, you get this:

    Please Login or Register  to view this content.
    and, if you tidy it up a bit, you can get this ... without being prompted by Excel

    Please Login or Register  to view this content.
    Then all you need is to add the lines of code (already provided by quekbc) to save the file and close it.



    Regards, TMS

  5. #5
    Registered User
    Join Date
    06-23-2014
    Location
    england
    MS-Off Ver
    2013
    Posts
    78

    Re: Comma Seperated Values UFT-8 Save in VBA

    Cheers for the advise, the reason I'm looking for a Macro alternative as my workbook has a lot of foreign characters. Saving via Excel to .CSV looses the foreign characters and a macro seems to be the easiest alternative to correct the issue i'm facing.

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,511

    Re: Comma Seperated Values UFT-8 Save in VBA

    OK, can you post a sample workbook with some typical but non-sensitive data?

    I recorded a macro to save as a .csv file, which gave me this:

    Please Login or Register  to view this content.

    Now, I've just saved it as a Unicode Text file format.

    Please Login or Register  to view this content.

    Problem is, I don't have data to test it with. But you can try that ... just change the output file name.


    Regards, TMS

+ 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. Add Comma seperated values of texttbox in different cells
    By kmlprtsngh in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-07-2010, 02:03 PM
  2. Sum values in cells seperated by comma's
    By keithnrhonda in forum Excel General
    Replies: 1
    Last Post: 09-15-2010, 12:30 AM
  3. Find the sum of Comma Seperated Values In a Cell
    By xcelion in forum Excel Formulas & Functions
    Replies: 24
    Last Post: 09-06-2005, 09:05 PM
  4. column values to a cell with comma seperated
    By Bob Phillips in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-06-2005, 06:05 AM
  5. column values to a cell with comma seperated
    By Bob Phillips in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 04:05 AM

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