Locale problem

I

iamrajy

We have VBA Macro in which we are using constants
min = 0.5
max = 0.999

If the locale is US[English] the macro code work fine with these
constants

If the code is used in Europe which has a differnt locale
which represent "decimal symbol = , ". So in the macro code
the decimal is getting dropped.

min = 5
max = 999

Is there a way to fix this problem without much modifying the code as
these constant are scattered accorss the code?

Thanks in advance.
 
T

Tom Ogilvy

Public Const sglMIN As Single = 0.5

declared at the top of a vba module should work in any regional version of
excel after xl95.
 
I

iamrajy

Thanks for your advise.

We have defined the bounds/variable related to columns in xml

e.g.

s_currentEntityXmlText = s_currentEntityXmlText & " <field
name=""STK_SRV_LEVEL"" fieldOrderNum=""17"" excelDataType=""Single""
required=""true"" excelLower=""0.5"" excelLowerExclusive=""false""
excelUpper=""0.999"" excelUpperExclusive=""false"" />"

In the macro we extract the value of excelLower and excelUpper and
there we get a problem when locale is not "United State"

In European locale the value get changed to 5 and 999

Any suggestion
 

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