Change regional format via VBA

Bering

Board Regular
Joined
Aug 22, 2018
Messages
185
Office Version
  1. 2016
Platform
  1. Windows
Hello,

Does anyone know a reliable way to temporarily change the regional format settings and switch them back to the default settings via VBA? I understand this could be done using API but I tried to adjust the below code to my needs without success:

Change region format to another language with VBA

I would need to:
run my macro, determine whether the settings are French - Switzerland, if so, change the settings from French - Switzerland to English GB, resume my macro and switch back to the default settings.

Thank you very much for any idea.
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
why would you do that ?
Can't you tackle your problem instead of using the big tools ?
Changing the regional settings, :eek:
 
Upvote 0
why would you do that ?
Can't you tackle your problem instead of using the big tools ?
Changing the regional settings, :eek:
I work for a francophone company while I am not, so I use English settings while my colleagues prefer French.. ugh
I honestly don’t want to rewrite all my macros to take into account different date formats and decimal separators.
At the moment, they simply change manually their regional settings when they use my macros and then set them back. I am just looking for some ideas to fix this through vba.
Thanks
 
Upvote 0

Forum statistics

Threads
1,214,652
Messages
6,120,746
Members
448,989
Latest member
mariah3

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