Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Programmatically Access to Symbol Dropdown in Format Cells Dialog

I pass a string to the property Range.NumberFormat to set the format of
a cell. So if I want format a cell with the value of "10" as a USD
currency, I pass the string, "$00.00".

Instead of hard-coding the dollar sign in the string, is there a way to
set the symbol by programmatically accessing whatever fills in the
symbol dropdown in the Format Cells dialog? Can, I in other words, set
the format of the string to "00.00" and then tell Excel to use the
English U.S. currency and get the "$" symbol added to the format
without actually setting the dollar sign directly?

I need to support multiple currencies so this is why I would like to
just pass the ISO currency identifier (for example, USD or EUR) and not
the actual currency character.

Is this at all possible? It doesn't seem to be available through the
Range object.

- Ed

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Programmatically Access to Symbol Dropdown in Format Cells Dialog

It isn't clear if you want multiple currencies represented on a single sheet
or to use the currency in the regional setting. If the latter, then

? formatCurrency(ActiveCell,2,vbUseDefault,vbUseDefa ult,vbFalse)
$534.42
might be an approach. Available in xl2000 and later I believe.

or

? application.international(xlCurrencyCode)
$



--
Regards,
Tom Ogilvy


"Edmundo" wrote:

I pass a string to the property Range.NumberFormat to set the format of
a cell. So if I want format a cell with the value of "10" as a USD
currency, I pass the string, "$00.00".

Instead of hard-coding the dollar sign in the string, is there a way to
set the symbol by programmatically accessing whatever fills in the
symbol dropdown in the Format Cells dialog? Can, I in other words, set
the format of the string to "00.00" and then tell Excel to use the
English U.S. currency and get the "$" symbol added to the format
without actually setting the dollar sign directly?

I need to support multiple currencies so this is why I would like to
just pass the ISO currency identifier (for example, USD or EUR) and not
the actual currency character.

Is this at all possible? It doesn't seem to be available through the
Range object.

- Ed


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Programmatically Access to Symbol Dropdown in Format Cells Dialog

I need to display multiple currencies. I need to be able to take a
currency code like "EUR" and then get the display for the current
culture (of the computer). If the current culture is one that doesn't
use EUR or the specified currency, then I have to get a display for
that currency which includes the symbol and its placement in regard to
the number. After that, I'll just format the cell accordingly.

On Jan 8, 11:16 am, Tom Ogilvy
wrote:
It isn't clear if you want multiple currencies represented on a single sheet
or to use the currency in the regional setting. If the latter, then

? formatCurrency(ActiveCell,2,vbUseDefault,vbUseDefa ult,vbFalse)
$534.42
might be an approach. Available in xl2000 and later I believe.

or

? application.international(xlCurrencyCode)
$

--
Regards,
Tom Ogilvy



"Edmundo" wrote:
I pass a string to the property Range.NumberFormat to set the format of
a cell. So if I want format a cell with the value of "10" as a USD
currency, I pass the string, "$00.00".


Instead of hard-coding the dollar sign in the string, is there a way to
set the symbol by programmatically accessing whatever fills in the
symbol dropdown in the Format Cells dialog? Can, I in other words, set
the format of the string to "00.00" and then tell Excel to use the
English U.S. currency and get the "$" symbol added to the format
without actually setting the dollar sign directly?


I need to support multiple currencies so this is why I would like to
just pass the ISO currency identifier (for example, USD or EUR) and not
the actual currency character.


Is this at all possible? It doesn't seem to be available through the
Range object.


- Ed- Hide quoted text -- Show quoted text -


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
Format cells dialog dawall33 Excel Discussion (Misc queries) 3 December 18th 09 03:13 PM
how to programmatically access excel services dialog in excel 2007 [email protected] Excel Discussion (Misc queries) 1 February 6th 08 03:01 PM
No Format Cells dialog box Fluke[_2_] Excel Discussion (Misc queries) 1 January 23rd 08 03:46 PM
format cells dialog box does not come up GMed Excel Discussion (Misc queries) 1 April 14th 05 05:00 PM
When I select "format cells", the format dialog box does not disp. Andy S. Excel Worksheet Functions 2 November 23rd 04 03:49 AM


All times are GMT +1. The time now is 11:00 PM.

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

About Us

"It's about Microsoft Excel"