+ Reply to Thread
Results 1 to 8 of 8

Reginal setting and export txt

  1. #1
    Registered User
    Join Date
    05-27-2015
    Location
    Zagreb
    MS-Off Ver
    2010
    Posts
    36

    Reginal setting and export txt

    Dear all,

    I have issue with creating txt file from xlsm. The thig is, my excel set up is as follows:

    "," as tousand separator,
    "." as decimal separator,

    but in Regional settings there is "." as tousand separator and "," as decimal separator.

    Therefore numbers in Excel are visible as e.g 4,500.00 and in txt is 4500,00 instad of 4500.00.

    Please Login or Register  to view this content.
    Is there a workaround?

    Thank you

    Tanja

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,659

    Re: Reginal setting and export txt

    You could swap them in the Text like this...

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Reginal setting and export txt


    Hi !

    Or just well set International property according to your need …

  4. #4
    Registered User
    Join Date
    05-27-2015
    Location
    Zagreb
    MS-Off Ver
    2010
    Posts
    36

    Re: Reginal setting and export txt

    Thank you alphaFrog, but I am not sure it will be applicable for my needs. There will be more users using this macro and some of them will have set reg.options as I do, some will have US settings. Therefore, I belive this will not work for me.

    Hi marc L,
    As I said before, more users will use this macro and we can not force all of them to have reg.settings this way (US). If they will have to change it each time while generating txt that whats the point of automatization.

    Tanja

  5. #5
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,659

    Re: Reginal setting and export txt

    This will record the current Decimal Separator and Thousands Separator settings, temporarily set them to (US), and restore the original settings after the text file export.

    Please Login or Register  to view this content.
    Last edited by AlphaFrog; 09-08-2015 at 10:03 AM.

  6. #6
    Registered User
    Join Date
    05-27-2015
    Location
    Zagreb
    MS-Off Ver
    2010
    Posts
    36

    Re: Reginal setting and export txt

    Hi alpha,

    This code changes system separators of excel and not regional language settings. Txt is still generated with sepaarators defined in reginal settings (control panel).

    Tanja

  7. #7
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,659

    Re: Reginal setting and export txt

    Quote Originally Posted by TZ Saic View Post
    Hi alpha,

    This code changes system separators of excel and not regional language settings. Txt is still generated with sepaarators defined in reginal settings (control panel).

    Tanja
    It worked for me if I had formatted the cells as currency.

    Otherwise, use my original suggestion to swap the separators but test if the user's system separators are not US style.
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    05-27-2015
    Location
    Zagreb
    MS-Off Ver
    2010
    Posts
    36

    Re: Reginal setting and export txt

    Thank you alphafrog

+ 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. Need help in setting boundaries in excel VBA (or is it called setting arrays?)
    By kjy1989 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-30-2013, 03:42 AM
  2. Macro to Export a Sheet but also export a macro?
    By ChrisF79 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-20-2013, 12:26 PM
  3. setting up an setting of limited characters per cell
    By itzmemike in forum Excel General
    Replies: 21
    Last Post: 02-05-2013, 09:48 PM
  4. I would need a macro to export data from base example workbook to export worbook
    By slato8 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-01-2012, 11:21 AM
  5. Setting class to Nothing re-setting project
    By Kyle123 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-27-2011, 11:38 AM
  6. Runtime Error 1004 when Setting Setting Series Values
    By tonymctigue in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 04-09-2010, 10:05 AM
  7. export from one to another
    By alton420 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-03-2009, 06:22 PM
  8. Reginal issue(Please help)
    By iamrajy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-08-2005, 04:24 PM

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