Regional Settings with VBA - Urgent

N

novice2005

Hello,

I have an excel workbook that outputs a file with numbers an
currencies. Since this Workbook is used globally and each region ha
its own regional setting, specifically digit grouping and decima
symbols interchanged. On creation the output file, th
numbers/currencies contain the decimal & digit grouping symbols a
their regional settings. But the file needs to contain decimals as do
and digit grouping as comma.

Before outputting the file, can we check the regional settings and i
its different from what is required, then change it and once the fil
is created revert it.

Please let me know if its a good option and if not suggest bette
ones.

Thanks
 
J

Jim Rech

can we check the regional settings and if its different from what is
I've tried this and never got it to work satisfactorily.
 
S

Stephen Bullen

Hi Novice2005,
Before outputting the file, can we check the regional settings and if
its different from what is required, then change it and once the file
is created revert it.

In Excel 2002 and above, you can set the Application.DecimalSeparator
and Application.ThousandsSeparator appropriately, do your writing, then
set them back. These correspond to the Tools > Options > International
tab.

Regards

Stephen Bullen
Microsoft MVP - Excel
www.oaltd.co.uk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top