Comma & Dot Seperators

andy3816

Board Regular
Joined
Mar 22, 2005
Messages
135
I saw the post from Gratu and subsequent response from Hot Pepper on how to query the excel installed to see if the European or American format of comma for thousands seperator and dot for decimal seperator or European format dot for thousands seperator and comma for decimal point seperator are being used, this prompted me to post this question.

Can you use VB to force excel to switch, ie check to see if european is being used then switch to American if true, then run some code and switch back when done.

The reason I need this is that I share a very complex workbook globally and the only way our European friends can get some of code and functions to work is to force their compuers to think they are American!!! by altering their international settings.

Any help would sure help international diplomacy!!!
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Excel has an International property that contains useful information about the user's country and international settings. Example:

Code:
Sub Test()
    Dim Msg As String
    Msg = "Decimal Separator: " & vbTab & vbTab & Application.International(xlDecimalSeparator) & vbCrLf
    Msg = Msg & "Thousands Separator: " & vbTab & Application.International(xlThousandsSeparator) & vbCrLf
    Msg = Msg & "List Separator: " & vbTab & vbTab & Application.International(xlListSeparator)
    MsgBox Msg
End Sub

You can use these in your code in place of hard coded characters, so that it is internationally transportable.

To my mind that's preferable to messing with the user's Control Panel settings.
 
Upvote 0
I can see how that would be preferable but I dont know exactly what it is in my spreadsheet that causes them a problem (and of course cant replicate on my machine) so I really wanted a quick and dirty fix to change their international settings temporarily....any ideas
 
Upvote 0
andy3816 said:
I can see how that would be preferable but I dont know exactly what it is in my spreadsheet that causes them a problem (and of course cant replicate on my machine) so I really wanted a quick and dirty fix to change their international settings temporarily....any ideas

You should be able to replicate the problem on your machine by changing your Regional settings to theirs.
 
Upvote 0
Unfortunately that didnt do it, short of flying to their country and seeing it for myself I cant think of another solution other than my original idea.

I know the inetrnational settings is the problem as when they change it everything works fine, this is happenig in more than one country too
 
Upvote 0
andy3816 said:
Unfortunately that didnt do it, short of flying to their country and seeing it for myself I cant think of another solution other than my original idea.

I know the inetrnational settings is the problem as when they change it everything works fine, this is happenig in more than one country too

If you don't know what international setting is causing the problem, how would you go about changing it, even if you could?
 
Upvote 0
I will just change it to American and then back to whatever it was before after the code has executed and the file closes
 
Upvote 0
andy3816 said:
I will just change it to American and then back to whatever it was before after the code has executed and the file closes

Change what setting to American? If you can't replicate the problem by changing to European, how do you know what setting to change?
 
Upvote 0
im guessing that the problem is with the thousands and decimal point seperators but I dot know for sure, the user changes the country setting in control panel which I am sure changes many settings some of which I probably dont care about
 
Upvote 0

Forum statistics

Threads
1,214,375
Messages
6,119,170
Members
448,870
Latest member
max_pedreira

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top