M
MikeVBA
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
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