PDA

View Full Version : Syntax for converting printing decimal number in English to Spanish



nagavineela
10-26-2010, 12:07 AM
Hi All,
Please help me in converting the decimal number in English to Spanish version. The code written is as follows:

txtavailability.Value = (1 / totfailrate) / ((1 / totfailrate) + ActiveSheet.Range("C4").Value) * 100
txtavailability.Value = Format(txtavailability.Value, "0.00000")

but the above line 3 of code value in Spanish is shown as 9.913.856 but in english version it is 99.1385 (correct value).

Please help me.

Thanks,
Vineela

Bob Phillips
10-26-2010, 12:27 AM
Maybe try



txtavailability.Value = Application.Text(txtavailability.Value, "#.##0,00000")

nagavineela
10-26-2010, 11:50 PM
Hi XLD,
Thank you. Still the problem exits.
after using the syntax provided above value is "991385615291032.000000" which is supposed to be "99,138562" in spanish version.
English version value is 99.138562 its equivalent in spanish is incorrect.

Please help me.

Thanks,

nagavineela
10-27-2010, 01:49 AM
typo error "exits". Yet my problem is not resolved.
Availability = 991385615291032.0000

nagavineela
10-27-2010, 01:57 AM
typo error "exits". Yet my problem is not resolved.
Availability = 991385615291032.0000