+ Reply to Thread
Results 1 to 10 of 10

Thread: Alter Chart Axis Label Number Format According to Language Selection

  1. #1
    Registered User
    Join Date
    07-06-2009
    Location
    Ottawa, Canada
    MS-Off Ver
    Excel 2007
    Posts
    10

    Alter Chart Axis Label Number Format According to Language Selection

    Hi there,

    I have created a chart template tool that creates a chart using information speicified by a user. The tool can create a chart displaying either English or French information. I'm having trouble accomodating the display of French numeric formatting (i.e., # ##0,00) in the tool via the enabling/disabling of the "System Separators" properties of MS Excel 2007. When in MS Excel 2003, it works fine. I know that the charting mechanism in MS 2007 was redesigned.

    Has anyone come across a similar problem? Was a solution found? If not, does that mean that I will have to programmatically alter the PC's regional settings to accomplish the desired language-specific numeric formatting?

    Thank you.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    2003 & 2007 & 2010
    Posts
    11,349

    Re: Alter Chart Axis Label Number Format According to Language Selection

    can you post example of how you are doing it for xl2003.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    07-06-2009
    Location
    Ottawa, Canada
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Alter Chart Axis Label Number Format According to Language Selection

    Basically, I've used the same code for 2007 has I had done for 2003:

    If gstrLanguageChoice = "_en" Then

    English Numeric Formatting (i.e., #,##0.00)
    -----------------------------------------
    With Application
    .UseSystemSeparators = False
    .DecimalSeparator = "."
    .ThousandSeparator = ","
    End With

    Else

    French Numeric Formatting (i.e., # ##0,00)
    -----------------------------------------
    With Application
    .UseSystemSeparators = False
    .DecimalSeparator = ","
    .ThousandSeparator = " "
    End With

    End If

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    2003 & 2007 & 2010
    Posts
    11,349

    Re: Alter Chart Axis Label Number Format According to Language Selection

    Please use (and edit your post) code tags when posting code.

    You code works for me with xl2007 SP2


    I assume yours was just a spelling mistake in this post
    .ThousandsSeparator = ","
    Cheers
    Andy
    www.andypope.info

  5. #5
    Registered User
    Join Date
    07-06-2009
    Location
    Ottawa, Canada
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Alter Chart Axis Label Number Format According to Language Selection

    Yes, it was a spelling mistake in the code that I had posted.

    So my code did work for you in altering the numeric format of the chart axis labels? I should have added that the code did change the numeric formatting of data in the worksheet, but it was not reflected in the chart axis labels themselves.

    If it also changed the formatting of the chart axis labels for you, I will have to ask the client how they configured xl2007 for their environment.

    Thanks.

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    2003 & 2007 & 2010
    Posts
    11,349

    Re: Alter Chart Axis Label Number Format According to Language Selection

    Yes your code worked for me.

    I assume your axis format is linked to the cells.
    Cheers
    Andy
    www.andypope.info

  7. #7
    Registered User
    Join Date
    07-06-2009
    Location
    Ottawa, Canada
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Alter Chart Axis Label Number Format According to Language Selection

    Yes. The format settings I have for my Y axes labels is that they are linked to the source data.

    How is your xl2007 SP2 set up? I wanted to test it out on my work laptop (I have been using my client's desktop for development and unit testing of the tool), but I remembered that I had downloaded a trial version of xl2007 a couple months back and the trial period has elapsed.

  8. #8
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    2003 & 2007 & 2010
    Posts
    11,349

    Re: Alter Chart Axis Label Number Format According to Language Selection

    Setup is standard.
    Version is 2007 (12.0.6504.5001) SP2 MSO (12.0.6425.1000)
    Cheers
    Andy
    www.andypope.info

  9. #9
    Registered User
    Join Date
    07-06-2009
    Location
    Ottawa, Canada
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Alter Chart Axis Label Number Format According to Language Selection

    Hi Andy,

    I loaded MS Office 2007 (Home and Student ed.) onto my work laptop and applied the necessary updates/fixes/patches to duplicate your settings. However, I am still unable to display the proper Y-axis label formatting in my chart. Is there a system setting I should change?

  10. #10
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    2003 & 2007 & 2010
    Posts
    11,349

    Re: Alter Chart Axis Label Number Format According to Language Selection

    Not that I know of.
    Can you post example workbook?
    Cheers
    Andy
    www.andypope.info

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0