Solved

Setting Decimal and Thousand Character in my App

Posted on 2001-06-19
4
267 Views
Last Modified: 2010-05-02
Hi folks,
i want to have only one output for numbers in my application. The Settings which are coming from the control panel for these characters should be ignored.

I can read it with GetLocaleInfo, but I can't set it with SetLocaleInfo. But when i format a number these changes have no effect. The number is displayed the same way.
Does anybody know how to change the current characters for the decimal and thousand character.

olka
0
Comment
Question by:olka
4 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 6205771
Yes, simply "escape" the format:

FORMAT(100.4, " #0\,000") will produce this output:
100,400
independant of the regional settings. The backslash will make the , to be forced, and not interpreted using the regional settings

Cheers
0
 

Author Comment

by:olka
ID: 6205797
thank you,
but now i have the problem with great number
try:
format(23412956.67, "#\.##0\,00")  => output is 234.129,57

but i want 23.412.956,67
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 50 total points
ID: 6206243
0
 
LVL 6

Expert Comment

by:andyclap
ID: 6207898
It's a bit of a pain that you can't escape a decimal point and still get the format function to understand it as a d.p.
You're best off writing your own little routine to do this - having the added advantage of providing a single point to change if you need to extend it to do different formats.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MS Access - Capture pressed key onclick 4 41
Hide vba in gp 7 104
converting visio 2010 to powerpoint 2010  - formatting issues 5 90
Export Data to Different .csv Files 26 114
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question