![]() ![]() ![]() Note that I have given an option for the workbook to be closed without saving because it is possible that someone messes up on a workbook and wants to close without savingĪnd re-open the previously saved version.ĭim bolFlag As Boolean Must be at top of module before any subs. To format the dates as numeric on Close and re format to local region on open. The code below might work in ThisWorkbook module Without workbooks created with dates in other regions I don't know if this will work but the dates are suppoed to have an underlying numeric value so try formatting the dates to numeric first before formatting to local region format.Īlternatively try to get a process in place whereby the dates are formatted as numeric before they leave a region and then they can be formatted to the local date format when they arrive in another region. ![]() Otherwise I'm going to have to create lookup tables for every locale the app is likely to be used in - I can already see this is probably how I'm going Ideally I'd like to be able to temporarily change or override this setting and then set it back. So, if it's not set to English I need to react accordingly.Īnd it's no good using (msoLanguageIDInstall) - just because they're using a Finnish or Chinese computer doesn't mean they're using the Locale setting native to that PC. CDate("Apr-2012") works fine only if the Number format Locale setting is one of theĮnglish options. Here's the problem: I have an international app that parses a string and extracts an English date in the form "Apr-2012" I then need to coerce that string to a true date. The macro recorder doesn't record the action of changing the setting either. I have also looked at Application.LanguageSettings but this too is unaffected or at least does not provide a method or property pertaining to this particular setting. To affect only the Date, Time and Special number categories. A user can change this independantly of the system settings and it appears you will see that there is a field labelled- Locale (location): I need a way to determine what this is set to. I'm after neither of the things that you suggest. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |