View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Jon Peltier Jon Peltier is offline
external usenet poster
 
Posts: 6,582
Default chart sizing and titling

This is the syntax:

ActiveChart.Axes(xlCategory, xlPrimary).AxisTitle.Font.Size = 10

Though it should work anyway, because xlCategory and xlPrimary are both
equal to 1, and the second argument is optional.

So to debug:
1. Is there an active chart?
2. Does it have a primary category axis?
3. Does this axis have a title?

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______



"BorisS" wrote in message
...
Tom, I cannot find these in the help for the VBA. I tried to find
specifically the title for an axis, and no luck. I am struggling with
trial
and error as well, having come up with

ActiveChart.Axes(xlPrimary).AxisTitle.Font.Size = 10

and having that be an error. Not sure how to write this stuff, so any
help
would be great.
--
Boris


"Tom Ogilvy" wrote:

See John Peltier's web site:

John Peltier
http://peltiertech.com/

http://pubs.logicalexpressions.com/P...cle.asp?ID=209
Charting FAQs

List of articles by Peltier
http://pubs.logicalexpressions.com/P...Search&AUTH=25

Spend some time in the object browser in the VBE. Find an object, click
on
it, hit F1 to get the help related to it.

--
Regards,
Tom Ogilvy



"BorisS" wrote:

with a given chart object select, what code do I need to do the
following
changes:

chart title font
primary axis title font
legend placement
chart size

I am using '07, so recording these movements is not working (apparently
a
known issue).
--
Boris