Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Programmatically determine if Workbook contains Macros in Excel 20 Barb Reinhardt Excel Programming 3 May 6th 08 12:57 PM
How to programmatically determine actual page count in Excel 2003? GopherDude Excel Programming 0 September 4th 07 08:46 PM
Programmatically determine Chart's data source drussell Excel Programming 2 March 4th 06 05:25 AM
How to programmatically determine which rows are outlined using Excel VBA code David Excel Programming 1 February 26th 05 02:29 AM
Programmatically determine if a control is .VISIBLE or not. Toby Erkson Excel Programming 2 April 16th 04 11:51 PM


All times are GMT +1. The time now is 01:49 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"