0

To give some background, I made some upgrades to an existing macro written by an ex-employee. As such, I didn't touch any of the core functions that were existing. Essentially the macro creates a bunch of reports based on the input.

The macro runs perfectly fine in the UK, however we are trying to expand it to some some teams in Europe. Testing this has resulted in some issues which are dependent on regional settings e.g. when the macro is run in Sweden it provides different result to when it is run in the UK on the same source data, however when the regional settings on the computer in Sweden are changed to the UK the output report matches that in the UK.

I've tried looking at system separators but unfortunately this doesn't seem to be making much of a difference to the results (commas and decimal separators).

I've looked at changing the region settings to the UK and then back to the host country but can't find anything on this. Any ideas or help on how to do this would be great.

Thanks!

EDIT: It's difficult to share the code due to the amount of modules (50). I think the best way may be to look at the format settings for different countries vs. UK and see if there is a way to set the excel workbook to run on the UK settings.

3

2 Answers 2

2

May be currency setting would be there. if you are able to share the code that is easy to understand and help full to get the solution.

0
0

I had similar experience when working on some European projects. The list separator may differs. In some regions it is comma, while in others it is semicolon. If this is not the case, then maybe you can create a function to change the PC's region setting to UK before your reports generation and then retrieve it back to the host region.

9
  • Another idea is that you may comment out the codes like On Error Resume Next to look for more clues. Though it is tough... Jun 27, 2018 at 12:35
  • The code doesn't give any errors, but due to the different formats the end result is different. I did do some research around changing the PC's region setting in VBA but the code goes way over my head, i did see another method which change a regex file.
    – Tony
    Jun 27, 2018 at 12:43
  • Could you share the codes on region setting you are trying? Or how about the solution here: stackoverflow.com/questions/42077145/… Jun 27, 2018 at 12:48
  • I've been looking at this post mrexcel.com/forum/excel-questions/…
    – Tony
    Jun 27, 2018 at 14:00
  • 1
    @Tony, that's calling the Windows API. I found another post with more info here andreavb.com/forum/viewtopic_6845.html Jun 27, 2018 at 15:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.