Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Locale problem


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.


--
iamrajy
------------------------------------------------------------------------
iamrajy's Profile: http://www.excelforum.com/member.php...o&userid=28117
View this thread: http://www.excelforum.com/showthread...hreadid=476247

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Locale problem





--
iamrajy
------------------------------------------------------------------------
iamrajy's Profile: http://www.excelforum.com/member.php...o&userid=28117
View this thread: http://www.excelforum.com/showthread...hreadid=476247

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Locale problem

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.

--
Regards,
Tom Ogilvy



"iamrajy" wrote in
message ...

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.


--
iamrajy
------------------------------------------------------------------------
iamrajy's Profile:

http://www.excelforum.com/member.php...o&userid=28117
View this thread: http://www.excelforum.com/showthread...hreadid=476247



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Locale problem


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


--
iamrajy
------------------------------------------------------------------------
iamrajy's Profile: http://www.excelforum.com/member.php...o&userid=28117
View this thread: http://www.excelforum.com/showthread...hreadid=476247

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date Format Under Japanese Locale York Excel Discussion (Misc queries) 3 December 19th 06 06:10 AM
VBA Date formatting and locale RS200Phil Excel Programming 3 July 15th 05 01:06 AM
Object doesn't support current locale setting: 'setlocale' Martin Eckart[_2_] Excel Programming 0 May 17th 05 09:41 AM
override locale computer settings n.almeida Excel Discussion (Misc queries) 3 February 18th 05 12:00 AM
TEXT(Cell1,"MMMM YYYY") to work in all locale. Jonathan Rynd Excel Programming 0 February 12th 04 06:33 PM


All times are GMT +1. The time now is 08:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"