VBA code to chaneg axis text on a chart?

Discussion in 'Microsoft Excel Charting' started by Newbie, Mar 24, 2010.

  1. Newbie

    Newbie Guest

    I've tried this but it doesn't work:

    .Axes(xlValue).AxisTitle.Text = "EE"

    Thanks in advance to whomever can help!
     
    Newbie, Mar 24, 2010
    #1
    1. Advertisements

  2. Newbie

    Andy Pope Guest

    Hi,

    These work for me,

    activechart.Axes(xlcategory,xlPrimary).hastitle=true
    activechart.Axes(xlcategory,xlPrimary).axistitle.text="Category Axis"
    activechart.Axes(xlvalue,xlPrimary).hastitle=true
    activechart.Axes(xlValue,xlPrimary).axistitle.text="Value Axis"

    What exactly does 'doesn't work' mean. Do you get an error message?

    Cheers
    Andy

    On 24/03/2010 20:35, Newbie wrote:
    > I've tried this but it doesn't work:
    >
    > .Axes(xlValue).AxisTitle.Text = "EE"
    >
    > Thanks in advance to whomever can help!
    >


    --

    Andy Pope, Microsoft MVP - Excel
    http://www.andypope.info
     
    Andy Pope, Mar 25, 2010
    #2
    1. Advertisements

  3. Newbie

    Newbie Guest

    Andy Pope rocks!!!!!!!!!!!!!!!!!!!!!!!
    Again you saved the day!
    It works! Thank you sooooooooo much!!!


    "Andy Pope" wrote:

    > Hi,
    >
    > These work for me,
    >
    > activechart.Axes(xlcategory,xlPrimary).hastitle=true
    > activechart.Axes(xlcategory,xlPrimary).axistitle.text="Category Axis"
    > activechart.Axes(xlvalue,xlPrimary).hastitle=true
    > activechart.Axes(xlValue,xlPrimary).axistitle.text="Value Axis"
    >
    > What exactly does 'doesn't work' mean. Do you get an error message?
    >
    > Cheers
    > Andy
    >
    > On 24/03/2010 20:35, Newbie wrote:
    > > I've tried this but it doesn't work:
    > >
    > > .Axes(xlValue).AxisTitle.Text = "EE"
    > >
    > > Thanks in advance to whomever can help!
    > >

    >
    > --
    >
    > Andy Pope, Microsoft MVP - Excel
    > http://www.andypope.info
    >
    > .
    >
     
    Newbie, Mar 25, 2010
    #3
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. brian
    Replies:
    2
    Views:
    998
    brian
    Sep 11, 2003
  2. K. McQ

    Switching x-axis & y-axis on line chart

    K. McQ, Nov 14, 2003, in forum: Microsoft Excel Charting
    Replies:
    1
    Views:
    1,132
    Jon Peltier
    Nov 15, 2003
  3. Guest
    Replies:
    2
    Views:
    563
    Andy Pope
    Mar 29, 2005
  4. Guest

    How do I set Line chart y Axis variable X axis value?

    Guest, Apr 17, 2005, in forum: Microsoft Excel Charting
    Replies:
    1
    Views:
    384
    Guest
    Apr 18, 2005
  5. Guest

    How do I change X-Axis values in a chart with 2 Y-Axis?

    Guest, May 3, 2005, in forum: Microsoft Excel Charting
    Replies:
    1
    Views:
    369
    Guest
    May 4, 2005
  6. Guest
    Replies:
    1
    Views:
    576
    Mangesh Yadav
    Jun 21, 2005
  7. Guest
    Replies:
    2
    Views:
    979
    Guest
    Jun 23, 2005
  8. Guest
    Replies:
    1
    Views:
    852
    Del Cotter
    Aug 17, 2007
Loading...