+ Reply to Thread
Results 1 to 3 of 3

Code that checks the language setting of Win

  1. #1
    Forum Contributor Gabor's Avatar
    Join Date
    02-15-2004
    Location
    Székesfehérvár, Hungary
    MS-Off Ver
    xl2016
    Posts
    226

    Code that checks the language setting of Win

    Hi,

    I have an Excel calendar that is with a heep of formulas and active control can show any year's calendar as per the user's wish.
    Also, with conditional formatting the weekend days are coloured, the Easter is calculated for the actual year and coloured, etc., etc.

    There is a particular formula in the calendar that contains the formatting definition: "DDD" that is responsible to make the cell showing the weekday with three digits, e.g Mon, Tue, etc. =TEXT(A2,"DDD")

    I am working for an international company so I have colleagues in Hungary, the States, Germany, Australia, all over the World. So, when I started to share this ever-calendar I experienced it was working properly only with the English language setting Windows.
    Cause: In the various language settings, there are different entries required for the same function: in the German version you have to apply "TTT" i nthe Hungarian it is "nnn" and so on.

    So what I need now is within Excel an Auto_Open that looks into the MS Windows launguage setting and dependant on what it finds, it will select the appropriate syntax for that particular formula in a form of entering that into a cell, which will be referenced by the formulas.

    Is that possible?

    Thanks for your attention

    Gábor

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    application.International(index)
    may give you some help.

    According to the help file the indexes that may be relevant are

    xlCountryCode: Long: Country/Region version of Microsoft Excel.
    xlCountrySetting: Long: Current country/region setting in the Windows Control Panel.

    So with a bit of testing at your various offices, you may be able to determine which result will give you the settings.

    When I ran
    application.International(xlcountrysetting): 61
    application.International(xlcountrycode): 1

    In control panel my Regional Option is English (Australia) and Location is Australia.

    HTH

    rylo

  3. #3
    Forum Contributor Gabor's Avatar
    Join Date
    02-15-2004
    Location
    Székesfehérvár, Hungary
    MS-Off Ver
    xl2016
    Posts
    226

    Thx

    Thanks, I made up something based on what you have advised, now testing will happen.
    Good day
    Gabor

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1