Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 169
Default Format function with international numbers

Hi,
I have an excel program which generate a word report in french or english.
The program request that the regional settings must be set to the language of
the report English (Canada) or French (Canada). I would like to avoid the
modification of the regional settings. I tried the following:
Sub Macro1()
Dim sValue as String
sValue = Format(2500000, "#,##0")
End Sub
This always gives 2 500 000 when the regional setting is French(Canada). I'm
wondering if there's a way to modify the format function to show 2,500,000
when the report is created in english ?
Thanks!
Alex

--
Alex St-Pierre
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Format function with international numbers

I have not tried it, but I would guess that if the international setting is
English, you could use default to get 2,500,000.

"Alex St-Pierre" wrote:

Hi,
I have an excel program which generate a word report in french or english.
The program request that the regional settings must be set to the language of
the report English (Canada) or French (Canada). I would like to avoid the
modification of the regional settings. I tried the following:
Sub Macro1()
Dim sValue as String
sValue = Format(2500000, "#,##0")
End Sub
This always gives 2 500 000 when the regional setting is French(Canada). I'm
wondering if there's a way to modify the format function to show 2,500,000
when the report is created in english ?
Thanks!
Alex

--
Alex St-Pierre

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Format function with international numbers

Stephen Bullen has the chapter of his book that deals with international
issues available on his web site. Take a look:

http://www.oaltd.co.uk/ExcelProgRef/ch22/

--
Regards,
Tom Ogilvy


"Alex St-Pierre" wrote in message
...
Hi,
I have an excel program which generate a word report in french or english.
The program request that the regional settings must be set to the language
of
the report English (Canada) or French (Canada). I would like to avoid the
modification of the regional settings. I tried the following:
Sub Macro1()
Dim sValue as String
sValue = Format(2500000, "#,##0")
End Sub
This always gives 2 500 000 when the regional setting is French(Canada).
I'm
wondering if there's a way to modify the format function to show 2,500,000
when the report is created in english ?
Thanks!
Alex

--
Alex St-Pierre



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
how format date with TEXT() function for international usage? AlexBY Excel Worksheet Functions 3 May 8th 09 06:38 PM
Function to uniformerly format different phone numbers Access Joe Excel Worksheet Functions 7 April 30th 08 08:04 PM
Working with times in military/international format. MidWest Yankee Excel Discussion (Misc queries) 2 April 8th 08 03:29 PM
Formula or Function to Set Many Existing Numbers in Same Format? Sloth Excel Discussion (Misc queries) 0 August 16th 06 05:11 PM
International number format (Excel 2000) marwan hefnawy Excel Programming 0 March 2nd 04 05:32 AM


All times are GMT +1. The time now is 12:01 AM.

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"