Determine International setting of Excel

frtklau

New Member
Joined
Apr 12, 2005
Messages
46
hi,
I need to determine International setting of the Excel that the code is running in.

Possible versions are:
Chinese MS Office 2000, and US MS Office 2000.

That is I need to know the Language of Excel. ( I suppose I don't need the Language setting of Windows, but that of Excel only ).
by doing so, I can adding conditional to my code so to circumvent some basic differences in use of PivotTable in Chinese and US Excel.

thanks

-Frankie
 
Sub Test1()
Dim iICC%, sICC$
iICC = Application.International(xlCountryCode)

Select Case iICC
Case 966
sICC = "Arabic (Saudi Arabia)"
Case 42
sICC = "Czech (Czech Republic)"
Case 45
sICC = "Danish (Denmark)"
Case 31
sICC = "Dutch (The Netherlands)"
Case 1
sICC = "English (The United States of America)"
Case 98
sICC = "Farsi (Iran)"
Case 358
sICC = "Finnish (Finland)"
Case 33
sICC = "French (France)"
Case 49
sICC = "German (Germany)"
Case 30
sICC = "Greek (Greece)"
Case 972
sICC = "Hebrew (Israel)"
Case 36
sICC = "Hungarian (Hungary)"
Case 91
sICC = "Indian (India)"
Case 39
sICC = "Italian (Italy)"
Case 81
sICC = "Japanese (Japan)"
Case 82
sICC = "Korean (Korea)"
Case 47
sICC = "Norwegian (Norway)"
Case 48
sICC = "Polish (Poland)"
Case 55
sICC = "Portuguese (Brazil)"
Case 351
sICC = "Portuguese (Portugal)"
Case 7
sICC = "Russian (Russian Federation)"
Case 86
sICC = "Simplified Chinese (People's Republic of China)"
Case 34
sICC = "Spanish (Spain)"
Case 46
sICC = "Swedish (Sweden)"
Case 66
sICC = "Thai (Thailand)"
Case 886
sICC = "Traditional Chinese (Taiwan)"
Case 90
sICC = "Turkish (Turkey)"
Case 92
sICC = "Urdu (Pakistan)"
Case 84
sICC = "Vietnamese (Vietnam)"
Case Else
sICC = "Unknown"
End Select

MsgBox _
"Your international country code: " & iICC & vbCrLf & vbCrLf & _
"The corresponding language and country is:" & vbCrLf & _
sICC, , "Excel's county code information:"

End Sub
 
Upvote 0
many thanks
It worked with Trad.Chinese Excel.

I shall try it with my US Excel.

thanks again.
-Frankie.

PS. If not too difficult, how to determine if it is Excel 97, Excel 2000 or Excel 2003?
 
Upvote 0
Because Excel97 was released with so many odd version text names such as 8.0e, I use this If structure for that with a nested Select Case for the others:

Sub Test1()
Dim myVersion$
If CLng(Left(Application.VERSION, InStr(Application.VERSION, ".") - 1)) = 8 Then
myVersion = "Excel97"
Else
Select Case Val(Application.VERSION)
Case 5
myVersion = "Excel5"
Case 9
myVersion = "Excel2000"
Case 10
myVersion = "Excel2002"
Case 11
myVersion = "Excel2003"
Case 12
myVersion = "Excel2005 *assuming it really gets realeased as 2005"
Case Else
myVersion = "No version information available"
End Select
End If
MsgBox myVersion, , "Your Excel version is..."
End Sub
 
Upvote 0

Forum statistics

Threads
1,226,775
Messages
6,192,932
Members
453,767
Latest member
922aloose

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