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:
    823
    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:
    948
    Jon Peltier
    Nov 15, 2003
  3. Guest
    Replies:
    2
    Views:
    365
    Andy Pope
    Mar 29, 2005
  4. Guest
    Replies:
    2
    Views:
    658
    Guest
    Jun 23, 2005
  5. Guest
    Replies:
    1
    Views:
    636
    Del Cotter
    Aug 17, 2007
Loading...

Share This Page