Saving CSV file with same settings from several computers in VBA Excel

TomBex

New Member
Joined
May 2, 2018
Messages
2
Hello people,

I am looking for a solution to save a file as CSV file with Always the same settings for list separator, decimal separator and thousand separator. If I run the macro from my computer the file will be as it should be because my local settings in Windows 10 are Decimal=, ; Thousand=. and semicolon=;. And my VBA code of the Line SaveAs has the argument Local:=True.
But when this macro is run by one of my collegues the CSV file has the separators that are use on American computers (semicolon=, decimal=. and Thousand=,). The collegues can not change their Windows local settings because they run a lot of programs that needs these settings.

My question is now how can we program our VBA code that it looks which user is running this file and macro and than change the local settings for saving this file and then put back the Original local settings. And here is the focus on the semicolon to ;.

The macro that is running now looks like this:



Who can help me in this matter.
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Thanks Special-K99,

I didn't know this. I am new to this forum. But maybe the text of my item is obvious enough to explain my problem and to receive an answer.

Tom
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top