PDA

Click to See Complete Forum and Search --> : Is there an API that can do this ( a bit of a strange one )


locutus
Feb 6th, 2001, 03:42 AM
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

Bill Crawley
Feb 6th, 2001, 05:12 AM
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.