+ Reply to Thread
Results 1 to 4 of 4

Locale problem

  1. #1
    Registered User
    Join Date
    10-14-2005
    Posts
    8

    Locale problem

    We have VBA Macro in which we are using constants
    min = 0.5
    max = 0.999

    If the locale is US[English] the macro code work fine with these constants

    If the code is used in Europe which has a differnt locale
    which represent "decimal symbol = , ". So in the macro code
    the decimal is getting dropped.

    min = 5
    max = 999

    Is there a way to fix this problem without much modifying the code as these constant are scattered accorss the code?

    Thanks in advance.

  2. #2
    Registered User
    Join Date
    10-14-2005
    Posts
    8

    Exclamation


  3. #3
    Tom Ogilvy
    Guest

    Re: Locale problem

    Public Const sglMIN As Single = 0.5

    declared at the top of a vba module should work in any regional version of
    excel after xl95.

    --
    Regards,
    Tom Ogilvy



    "iamrajy" <[email protected]> wrote in
    message news:[email protected]...
    >
    > We have VBA Macro in which we are using constants
    > min = 0.5
    > max = 0.999
    >
    > If the locale is US[English] the macro code work fine with these
    > constants
    >
    > If the code is used in Europe which has a differnt locale
    > which represent "decimal symbol = , ". So in the macro code
    > the decimal is getting dropped.
    >
    > min = 5
    > max = 999
    >
    > Is there a way to fix this problem without much modifying the code as
    > these constant are scattered accorss the code?
    >
    > Thanks in advance.
    >
    >
    > --
    > iamrajy
    > ------------------------------------------------------------------------
    > iamrajy's Profile:

    http://www.excelforum.com/member.php...o&userid=28117
    > View this thread: http://www.excelforum.com/showthread...hreadid=476247
    >




  4. #4
    Registered User
    Join Date
    10-14-2005
    Posts
    8

    Exclamation Locale problem (imp)

    Thanks for your advise.

    We have defined the bounds/variable related to columns in xml

    e.g.

    s_currentEntityXmlText = s_currentEntityXmlText & " <field name=""STK_SRV_LEVEL"" fieldOrderNum=""17"" excelDataType=""Single"" required=""true"" excelLower=""0.5"" excelLowerExclusive=""false"" excelUpper=""0.999"" excelUpperExclusive=""false"" />"

    In the macro we extract the value of excelLower and excelUpper and there we get a problem when locale is not "United State"

    In European locale the value get changed to 5 and 999

    Any suggestion

+ 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