PC Review


Reply
Thread Tools Rate Thread

Custom NumberFormat - international version

 
 
snovik
Guest
Posts: n/a
 
      19th Nov 2008
I am trying to setup a custom NumberFormat in the way that could be used in
different regional settings. For example, I would like to have

"[Green]0,00_ ;[Red]-0,00"

applicable to US / DE / UK / RU / whatever else settings. Currently I get an
error when I try to move this code from one PC to another.

Is there a way to make NumberFormat culture independent?
 
Reply With Quote
 
 
 
 
Daniel.C
Guest
Posts: n/a
 
      19th Nov 2008
You should try :
"[Green]0.00_ ;[Red]-0.00"
Regards.
Daniel

> I am trying to setup a custom NumberFormat in the way that could be used in
> different regional settings. For example, I would like to have
>
> "[Green]0,00_ ;[Red]-0,00"
>
> applicable to US / DE / UK / RU / whatever else settings. Currently I get an
> error when I try to move this code from one PC to another.
>
> Is there a way to make NumberFormat culture independent?



 
Reply With Quote
 
snovik
Guest
Posts: n/a
 
      19th Nov 2008
yes, and I get the following message (I try to set it in the code, not UI)

Microsoft Office Excel cannot use the number format you typed.

Try using one of the built-in number formats. On the Format menu, click
Cells, and then click the Number tab. Select the category you want, and then
choose other options.


"Daniel.C" wrote:

> You should try :
> "[Green]0.00_ ;[Red]-0.00"
> Regards.
> Daniel
>
> > I am trying to setup a custom NumberFormat in the way that could be used in
> > different regional settings. For example, I would like to have
> >
> > "[Green]0,00_ ;[Red]-0,00"
> >
> > applicable to US / DE / UK / RU / whatever else settings. Currently I get an
> > error when I try to move this code from one PC to another.
> >
> > Is there a way to make NumberFormat culture independent?

>
>
>

 
Reply With Quote
 
Daniel.C
Guest
Posts: n/a
 
      19th Nov 2008
Sorry. It works for me (french settings) :
Selection.NumberFormat = "[Green]0.00_ ;[Red]-0.00"
Daniel

> yes, and I get the following message (I try to set it in the code, not UI)
>
> Microsoft Office Excel cannot use the number format you typed.
>
> Try using one of the built-in number formats. On the Format menu, click
> Cells, and then click the Number tab. Select the category you want, and then
> choose other options.
>
>
> "Daniel.C" wrote:
>
>> You should try :
>> "[Green]0.00_ ;[Red]-0.00"
>> Regards.
>> Daniel
>>
>>> I am trying to setup a custom NumberFormat in the way that could be used in
>>> different regional settings. For example, I would like to have
>>>
>>> "[Green]0,00_ ;[Red]-0,00"
>>>
>>> applicable to US / DE / UK / RU / whatever else settings. Currently I get
>>> an error when I try to move this code from one PC to another.
>>>
>>> Is there a way to make NumberFormat culture independent?

>>
>>
>>



 
Reply With Quote
 
Daniel.C
Guest
Posts: n/a
 
      19th Nov 2008
Did you try to use the macro recorder ?
Daniel

> yes, and I get the following message (I try to set it in the code, not UI)
>
> Microsoft Office Excel cannot use the number format you typed.
>
> Try using one of the built-in number formats. On the Format menu, click
> Cells, and then click the Number tab. Select the category you want, and then
> choose other options.
>
>
> "Daniel.C" wrote:
>
>> You should try :
>> "[Green]0.00_ ;[Red]-0.00"
>> Regards.
>> Daniel
>>
>>> I am trying to setup a custom NumberFormat in the way that could be used in
>>> different regional settings. For example, I would like to have
>>>
>>> "[Green]0,00_ ;[Red]-0,00"
>>>
>>> applicable to US / DE / UK / RU / whatever else settings. Currently I get
>>> an error when I try to move this code from one PC to another.
>>>
>>> Is there a way to make NumberFormat culture independent?

>>
>>
>>



 
Reply With Quote
 
snovik
Guest
Posts: n/a
 
      19th Nov 2008
this is where I got this string from and trying to use it via .COM

"Daniel.C" wrote:

> Did you try to use the macro recorder ?
> Daniel
>
> > yes, and I get the following message (I try to set it in the code, not UI)
> >
> > Microsoft Office Excel cannot use the number format you typed.
> >
> > Try using one of the built-in number formats. On the Format menu, click
> > Cells, and then click the Number tab. Select the category you want, and then
> > choose other options.
> >
> >
> > "Daniel.C" wrote:
> >
> >> You should try :
> >> "[Green]0.00_ ;[Red]-0.00"
> >> Regards.
> >> Daniel
> >>
> >>> I am trying to setup a custom NumberFormat in the way that could be used in
> >>> different regional settings. For example, I would like to have
> >>>
> >>> "[Green]0,00_ ;[Red]-0,00"
> >>>
> >>> applicable to US / DE / UK / RU / whatever else settings. Currently I get
> >>> an error when I try to move this code from one PC to another.
> >>>
> >>> Is there a way to make NumberFormat culture independent?
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Assemly-level Custom Attribute: Can it be shown in File Property->Version->Other Version Information José Joye Microsoft Dot NET 1 14th Aug 2007 03:04 PM
Assemly-level Custom Attribute: Can it be shown in File Property->Version->Other Version Information José Joye Microsoft C# .NET 1 14th Aug 2007 03:04 PM
Windows Vista "international" or "North America" version?! lucavilla@cashette.com Windows Vista General Discussion 1 27th Mar 2007 12:13 AM
Hold 'Em International Version =?Utf-8?B?VHJlbm9tYXJjdXM=?= Windows Vista Games 0 7th Feb 2007 07:36 PM
International Access version problem bobby Microsoft Access ADP SQL Server 4 13th Apr 2005 07:30 AM


Features
 

Advertising
 

Newsgroups
 


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