VBA Excel Chart DateFormat Language Settings Locale

G

Guest

I have designed a little application that produces graphs in Excel and then
exports them as pictures to Powerpoint Presentations.

These powerpoints presentations are generated in five different languages.

The problem is now that I want the axis with the dates formatted according
to the different languages, i.e. that the (long) month's name is displayed
correctly.

New in Office XP you have the possibilty to format the dates of an axis
according to a specific "locale", i.e. country/language. If you choose the
axis and then right-click and choose format-axis a userform will be
displayed. In this userfom you have a tab for the numbers where you can
chosse the number fomats. If you select "date", a dropdown list for the
locales appears where you can change the language of the date-formats for the
axis.

If you use the macro recorder doing this it will result in something like
this:

Selection.TickLabels.NumberFormat = "[$-100C]d mmm yy;@"

Does anyone know where these format-codes (e.g [$-100C]) can be looked up
and how exactly they work? More specific: do these codes depend on the
language settings of Windows, of Office etc.

I went for the "excel-bible" of Bullen, Bovey et al. Although they have
specific chapter on international issues, not a single word about this.

Also on the net nothing can be found, not even mentioning the help files...
I am thankful for any hint or contact that might help.

Michael
 
G

Guest

Ed Ferrero said:
Hi Marabu,

Microsoft information on format codes is at
http://office.microsoft.com/en-us/assistance/CH010036911033.aspx
in particular, the article 'Creating international number formats' may help
you.

Ed Ferrero
Microsoft Excel MVP
http://www.edferrero.com
Does anyone know where these format-codes (e.g [$-100C]) can be looked up
and how exactly they work? More specific: do these codes depend on the
language settings of Windows, of Office etc.

Hi Ed

Thanx very much. This was exactly what I was looking for.


Michael
 

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