ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   VBA code to chaneg axis text on a chart? (https://www.excelbanter.com/charts-charting-excel/259836-vba-code-chaneg-axis-text-chart.html)

newbie

VBA code to chaneg axis text on a chart?
 
I've tried this but it doesn't work:

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

Thanks in advance to whomever can help!


Andy Pope

VBA code to chaneg axis text on a chart?
 
Hi,

These work for me,

activechart.Axes(xlcategory,xlPrimary).hastitle=tr ue
activechart.Axes(xlcategory,xlPrimary).axistitle.t ext="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

VBA code to chaneg axis text on a chart?
 
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=tr ue
activechart.Axes(xlcategory,xlPrimary).axistitle.t ext="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

.



All times are GMT +1. The time now is 06:51 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com