Solved

Setting Decimal and Thousand Character in my App

Posted on 2001-06-19
4
266 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 142

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

786 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