How to align the category axis to plot area

G

Guest

I'm trying to align my category axis of my chart to the bottom of my plot
area. I have some negative data and it's moving the date (category axis) into
the data of the plot area.

Hope this make sense. Thanks!!
 
G

Guest

Works great!!

Would you happen to know how I could reflect this through VBA.

Thanks again!!
 
A

Andy Pope

The simplest thing to do is use the macro recorder whilst you apply the
settings.

ActiveChart.Axes(xlCategory).Select
.MajorTickMark = xlOutside
.MinorTickMark = xlNone
.TickLabelPosition = xlLow ' < this line does it
End With


Cheers
Andy
 
G

Guest

Thanks Andy....

However I get a runtime error 438... Object doesn't support this property or
method.

I have some existing code that I was attempting to insert this into to clean
up the data results..... here's the snippet....
FYI.. the added portion was added after I ran it sans addition with same 438
error...


Selection.Position = xlBottom
ActiveChart.Axes(xlCategory).Select
Selection.TickLabels.NumberFormat = "mm/dd"
With Selection.TickLabels
.Alignment = xlCenter
.Offset = 100
.ReadingOrder = xlContext
.Orientation = xlUpward
End With
ActiveChart.Axes(xlCategory).Select 'just added 11-3-06
With Selection.TickLabels <---- I added this from your code posted earlier
.MajorTickMark = xlOutside
.MinorTickMark = xlNone
.TickLabelPosition = xlLow ' < this line does it
End With
ActiveChart.ChartTitle.Select
Selection.AutoScaleFont = True
 
A

Andy Pope

The best thing would be for YOU to record the code. Then you can
incorporate that into the routine.

Cheers
Andy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top