LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Excel VBA xlcountrycode always returns 1 = US

I have been using a VBA script for 3-4 years now with no issues, but just
recently noticed a problem with new PC's or refreshed to new laptops where
the region seems stuck to US (1).

Despite changing the PC region/local language in Control panel to "English
UK" - it always reads 1. Is there a hiden registry entry where a PC OS build
can force xlcountrycode to 1 (US) , even though date format/locale shows and
works as UK(44).

I can take the same file VBA acript onto my PC or another PC run it and
returns "44" for the UK as expected. Yet if I compare the Region-Language
settings thoroughly to format/customise etc etc - they are identical.

So why do our new PC's think they are US - xlcountrycode returns "1" always

sample code below
===============
If Application.International(xlCountrySetting) < 1 And
Application.International(xlCountrySetting) < 2 Then
deal_info(7) = Format(Cells(row_ptr_b, date_ref), "dd-mmm-yyyy")
Else
deal_info(7) = Format(Cells(row_ptr_b, date_ref), "mmm-dd-yyyy")
End If


 
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
Index with mulitple value returns and muliple column returns solar+CSE Excel Worksheet Functions 4 June 12th 09 04:43 PM
Date returns always returns: 00 January 1900 ArcticWolf Excel Worksheet Functions 2 September 11th 08 12:31 PM
Createobject returns null in Excel [email protected] Excel Discussion (Misc queries) 1 March 27th 06 04:04 AM
Excel Returns Blank Jeff Excel Programming 8 May 10th 05 02:34 AM
Excel VBA - carriage returns KD[_3_] Excel Programming 1 September 7th 04 09:06 PM


All times are GMT +1. The time now is 07:50 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"