
Setting Font Size of Chart Title and axis title
I have a very strange problem with chart objects.
I made a subroutine in which the chart object is made based on a range of
data.
I created the chart with the chartwizard method.
Then I want to change the font size and style of the chart title and of the
Y-axis (value axis).
This works fine as long as I run the subroutine separately on the sheet or
when I run it in debug mode (I set a breakpoint just before the creation)
However, in the complete execution of the program (in short,my program makes
smoe sheets and creates a chart from the data on a sheet), it sets the a
completely different size for the titles then the one I specify.
What is happening here? It seems like the program is ignoring my code.
Here is the code that I use:
ActiveChart.ChartWizard Source:=Range(Cells(3, 10), Cells(Li_RowCnt - 1,
17)), _
Gallery:=xlColumn, Format:=6, PlotBy:=xlColumns, _
categorylabels:=1, Serieslabels:=1, _
HasLegend:=1, Title:=As_Header, _
CategoryTitle:="", valuetitle:="Million " &
Gs_currency, extratitle:=""
ActiveChart.Axes(xlCategory).TickLabels.Orientation = -90
ActiveChart.ChartTitle.Font.Size = 16
ActiveChart.Axes(xlValue).AxisTitle.Font.Size = 10
ActiveChart.ChartTitle.Font.Color = RGB(0, 0, 255)
Only the labels and the color are set correctly.
Any help is greatly appreciated.
Johan Vanmol