I have a code that may OR may not run on computers with decimal separator "," (comma), but my code is running specifically for "."(dot) separator.
During the execution, several new workbooks are created and saved as text files.
I managed to write the following code (saved in the "This Workbook" module), but it solves the problem only for This Workbook. I need a code that solves the issue for all Excel workbooks, or even better - changes the system settings (Windows settings).
The settings should be restored as soon as This Workbook is closed.
PrivateSub Workbook_BeforeClose(Cancel AsBoolean)
With Application
.DecimalSeparator = ","
.UseSystemSeparators = True
EndWith
EndSub
PrivateSub Workbook_Open()
With Application
.DecimalSeparator = "."
.UseSystemSeparators = False
EndWith
EndSub