A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Charts and Charting
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

VBA code to chaneg axis text on a chart?



 
 
Thread Tools Display Modes
  #1  
Old March 24th, 2010, 09:35 PM posted to microsoft.public.excel.charting
newbie
external usenet poster
 
Posts: 160
Default 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!

  #2  
Old March 25th, 2010, 09:35 AM posted to microsoft.public.excel.charting
Andy Pope
external usenet poster
 
Posts: 2,088
Default 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

  #3  
Old March 25th, 2010, 02:32 PM posted to microsoft.public.excel.charting
newbie
external usenet poster
 
Posts: 160
Default 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

.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:32 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.