Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Secundary Axis
Hi All, This is a "Charting through VBA" question. Is there any way to specify features for the secundary axis differen for those of the Y axis (Xlvalue ). I´ve tried this but it didn´t work. For the main Y axis With ActiveChart.Axes(xlValue) .HasTitle = True .HasMinorGridlines = False .HasMajorGridlines = False .AxisTitle.Orientation = xlHorizontal .AxisTitle.Text = "M€" .TickLabels.Orientation = xlHorizontal .TickLabels.Font.Size = 8 End With For the Secondary axis With ActiveChart.Axes(xlSecondary) .HasTitle = True .AxisTitle.Orientation = xlHorizontal .AxisTitle.Text = "hh€" .TickLabels.Orientation = xlHorizontal .TickLabels.Font.Size = 8 End With I,ve even tried With ActiveChart.Axes.Item(2) No way Could anybody give me a clue over how to achieve it ? Thank -- ignhde Posted from - http://www.officehelp.i |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Secundary Axis
I assume the missing dot's to attach to the "With" is an omission in the
post. But the main thing is if you want to refer to the secondary axis you need to supply the second optional argument to "Axes", from help - expression.Axes(Type, AxisGroup) With ActiveChart.Axes(xlValue, xlSecondary) .HasTitle = True If .AxisGroup = xlPrimary Then .HasMinorGridlines = False .HasMajorGridlines = False End If .AxisTitle.Orientation = xlHorizontal .AxisTitle.Text = "M€" .TickLabels.Orientation = xlHorizontal .TickLabels.Font.Size = 8 End With Also note With ActiveChart.Axes(xlSecondary) is the same as doing With ActiveChart.Axes(xlValue, xlPrimary) because xlSecondary & xlValue both return the constant value 2, and xlPrimary is the default optional second argument. Regards, Peter T "ignhdez" wrote in message ... Hi All, This is a "Charting through VBA" question. Is there any way to specify features for the secundary axis different for those of the Y axis (Xlvalue ). I´ve tried this but it didn´t work. For the main Y axis With ActiveChart.Axes(xlValue) HasTitle = True HasMinorGridlines = False HasMajorGridlines = False AxisTitle.Orientation = xlHorizontal AxisTitle.Text = "M€" TickLabels.Orientation = xlHorizontal TickLabels.Font.Size = 8 End With For the Secondary axis With ActiveChart.Axes(xlSecondary) HasTitle = True AxisTitle.Orientation = xlHorizontal AxisTitle.Text = "hh€" TickLabels.Orientation = xlHorizontal TickLabels.Font.Size = 8 End With I,ve even tried With ActiveChart.Axes.Item(2) No way Could anybody give me a clue over how to achieve it ? Thanks -- ignhdez Posted from - http://www.officehelp.in |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Secundary Axis
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Need PivotChart x axis to cross Y axis at minimum Y axis value | Charts and Charting in Excel | |||
Excel 2003: Mapping rows (x-axis) vs multiple columns (y-axis) | Excel Discussion (Misc queries) | |||
can I make the vertical axis the category axis in Excel line graph | Charts and Charting in Excel | |||
Adding data on Axis Major Gridlines next to Category Axis Collums | New Users to Excel | |||
How to insert X axis scale values next to axis and X axis grid lin | Charts and Charting in Excel |