I am writing a macro that will have both Hebrew and English language in it, but I would only like to display Hebrew characters if the system locale is set to Hebrew and otherwise I want to transliterate in English.
This is due to a quirk in the way Excel macros seems to deal with languages or at least Hebrew (for some reason even if you have the keyboard set to Hebrew and will output Hebrew in almost every application, it will not for the Excel macro editor until you set the system local to be Hebrew as well and so the spreadsheet will also not show Hebrew even though if you typed it directly in the cell it would show fine - this is true for Excel 2010 and 2013 at least).
In any case, I have tried several lines which have not worked and they are:
Application.LanguageSettings.LanguageID(msoLanguageIDUI)
Application.LanguageSettings.LanguageID(msoLanguageIDInstall)
Application.LanguageSettings.LanguagePreferredForEditing(msoLanguageIDHebrew)
These have not worked in identifying the system locale and output the same value whether on an English (US) locale or Hebrew (Israel) one.
Can anyone tell me what I need to do to indicate either by a number or text what the system locale is?