![]() |
Is it possible to programmatically determine where a user is?
Hi everybody,
Im writing some VBA code to customize several office programs I know how to find users login name but Im not sure that is possible to find the region or country they are ? If I can find their country then I can apply some default settings for each region. We have offices in US, Europe and Asia. Thanks, -- Best regards, Edward |
Is it possible to programmatically determine where a user is?
Hi Edward
You can test the country code Application.International(xlCountryCode) Dutch is 31 for example See this page http://support.microsoft.com/default...b/213833/en-us -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Edward" wrote in message ... Hi everybody, Im writing some VBA code to customize several office programs I know how to find users login name but Im not sure that is possible to find the region or country they are ? If I can find their country then I can apply some default settings for each region. We have offices in US, Europe and Asia. Thanks, -- Best regards, Edward |
Is it possible to programmatically determine where a user is?
Try
application.International(xlcountrysetting) it will be a code which needs interpreting, for example 44 is GB. -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Edward" wrote in message ... Hi everybody, I'm writing some VBA code to customize several office programs I know how to find users login name but I'm not sure that is possible to find the region or country they are ? If I can find their country then I can apply some default settings for each region. We have offices in US, Europe and Asia. Thanks, -- Best regards, Edward |
Is it possible to programmatically determine where a user is?
Msgbox Application.International(xlCountryCode)
....gives Denmark = 45 :-) "Edward" skrev i en meddelelse ... Hi everybody, Im writing some VBA code to customize several office programs I know how to find users login name but Im not sure that is possible to find the region or country they are ? If I can find their country then I can apply some default settings for each region. We have offices in US, Europe and Asia. Thanks, -- Best regards, Edward |
Is it possible to programmatically determine where a user is?
I get 1 on my system for that Ron, which I assume is the US, so I reckoned
it was the language version? -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Ron de Bruin" wrote in message ... Hi Edward You can test the country code Application.International(xlCountryCode) Dutch is 31 for example See this page http://support.microsoft.com/default...b/213833/en-us -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Edward" wrote in message ... Hi everybody, I'm writing some VBA code to customize several office programs I know how to find users login name but I'm not sure that is possible to find the region or country they are ? If I can find their country then I can apply some default settings for each region. We have offices in US, Europe and Asia. Thanks, -- Best regards, Edward |
Is it possible to programmatically determine where a user is?
Hi Bob
Yes 1 = US US Vista with US O 2007 MsgBox Application.International(xlCountryCode) = 1 MsgBox Application.International(xlCountrySetting) = 1 US Win XP with German O2007 MsgBox Application.International(xlCountryCode) = 49 MsgBox Application.International(xlCountrySetting) = 1 So as far as I can test it xlCountryCode = Excel language version xlCountrySetting = Windows language version -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Bob Phillips" wrote in message ... I get 1 on my system for that Ron, which I assume is the US, so I reckoned it was the language version? -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Ron de Bruin" wrote in message ... Hi Edward You can test the country code Application.International(xlCountryCode) Dutch is 31 for example See this page http://support.microsoft.com/default...b/213833/en-us -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Edward" wrote in message ... Hi everybody, I'm writing some VBA code to customize several office programs I know how to find users login name but I'm not sure that is possible to find the region or country they are ? If I can find their country then I can apply some default settings for each region. We have offices in US, Europe and Asia. Thanks, -- Best regards, Edward |
Is it possible to programmatically determine where a user is?
From Help
xlCountryCode Long Country/Region version of Microsoft Excel. xlCountrySetting Long Current country/region setting in the Windows Control Panel. -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Ron de Bruin" wrote in message ... Hi Bob Yes 1 = US US Vista with US O 2007 MsgBox Application.International(xlCountryCode) = 1 MsgBox Application.International(xlCountrySetting) = 1 US Win XP with German O2007 MsgBox Application.International(xlCountryCode) = 49 MsgBox Application.International(xlCountrySetting) = 1 So as far as I can test it xlCountryCode = Excel language version xlCountrySetting = Windows language version -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Bob Phillips" wrote in message ... I get 1 on my system for that Ron, which I assume is the US, so I reckoned it was the language version? -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Ron de Bruin" wrote in message ... Hi Edward You can test the country code Application.International(xlCountryCode) Dutch is 31 for example See this page http://support.microsoft.com/default...b/213833/en-us -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Edward" wrote in message ... Hi everybody, I'm writing some VBA code to customize several office programs I know how to find users login name but I'm not sure that is possible to find the region or country they are ? If I can find their country then I can apply some default settings for each region. We have offices in US, Europe and Asia. Thanks, -- Best regards, Edward |
All times are GMT +1. The time now is 07:17 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com