Solved

Setting Decimal and Thousand Character in my App

Posted on 2001-06-19
4
261 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 69

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

746 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now