user1681664
user1681664

Reputation: 1811

make chart axis position low - vba

The default x-axis position of the charts made by vba are in the middle. How do I make the axis on the chart show up on the bottom?

my current code:

ActiveSheet.Shapes.AddChart.Select
ActiveChart.SetSourceData Source:=Range("I3", Sheets("Main").Range("L3").End(xlDown).Address)
ActiveChart.ChartType = xlLine
With ActiveChart.Parent
.Height = 400
.Width = 800
End With

Upvotes: 0

Views: 7423

Answers (1)

Matteo NNZ
Matteo NNZ

Reputation: 12695

Just use the TickLabelPosition property of your axis:

ActiveChart.Axes(xlCategory).TickLabelPosition = xlTickLabelPositionLow

Upvotes: 6

Related Questions