I have an Excel application that is programmed in English (USA). I have a couple of users who use their system in Portuguese. When the app. is run on their machines REGARDLESS of the language setting they're using, the below variable sngBreak ALWAYS returns a value formatted in Portuguese, for example, if the cell contains 1.5 (language setting to English) the variable contains 1,5; if the cell contains 1,5 (language setting Portuguese) the variable still contains 1,5.
Sample code:
Please Login or Register to view this content.
I've tried the below code when the workbook opens and it doesn't affect the VBA variable settings:
This works visually in the spreadsheet cells just fine but it doesn't affect the internal VBA variable representation of the number. Also, so no one will mention it, trying to Replace commas with decimal points only affects the visual contents of the sheet i.e., it doesn't work, it's not a solution.Please Login or Register to view this content.
How do I get the sngBreak variable to register its values as English? Is there a way to force Excel to run as English (maybe a solution)?
Bookmarks