Results 1 to 2 of 2

Thread: Is there an API that can do this ( a bit of a strange one )

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 1999
    Location
    UK
    Posts
    300
    Hi

    This is the problem:

    I have written an app that runs in spain. This app is a VBA program, the spanish use a comma [ , ] instead of dot [ . ] to signify a decimal place. In the reginal setting of the sole users PC under the number tab there is a setting called Decimal symbol. He has it set to the comma. The application produces wrong calculations when he runs the app. Unless of course before he uses it he changes the comma to a dot in the reginal settings he will then get the correct results.
    He does not want to change the setting permenently as this is not the way they work over there, instead it should just be changed when the program runs once a month for a hour.
    So ! (deep breath ) is there an api that can change this setting behind the scence's when the user presses the calculate button and then reverse the process when the app has finished.
    Or indeed if you have any other idea's how to get round this then please feel free to let me know .

    Many thx
    Locutus
    Resistance is futile

  2. #2
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Dunmow,Essex,England
    Posts
    898
    you need to code for it.

    You can do a couple of things. The first is conditional compilation using somthing like:

    #If conFrenchVersion Then
    ' <code specific to the French language version>.
    #ElseIf conGermanVersion then
    ' <code specific to the German language version>.
    #Else
    ' <code specific to other versions>.
    #End If


    or remove the # and use it as a standard test. You can also test for the currency symbol and apply it as a general thing on output. so you leave the calculation as is, but use the format function depending on the currency.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width