PDA

View Full Version : Solved: Changing position of Chart XValues



paulked
06-24-2007, 09:16 AM
Hi all,

I am creating a chart as a new sheet from a command button on a full screen sheet (see attached). On a particular Chart (Tilt) I have typical values in the range of -30 to 30 (Representing Up and Down Tilt angles from 0deg (Level))

When the chart is plotted the XValues are placed below the '0' line in the Plot Area.

Is it possible to change the position of these to be in the Chart Area as in the other charts. :dunno

Best Reards

Paul Ked

mdmackillop
06-24-2007, 10:23 AM
Like this?
With ActiveChart
.HasAxis(xlCategory, xlPrimary) = True
.HasAxis(xlValue, xlPrimary) = True
.Axes(xlValue).CrossesAt = -30
End With

paulked
06-24-2007, 10:28 AM
Shear brilliance :bow:

Many thanks

Paul Ked

mdmackillop
06-24-2007, 10:32 AM
For things like this, try the macro recorder on a simple chart. That's where the solution came from.
Regards
MD

paulked
06-24-2007, 10:53 AM
Did try to (most of the code has been 'written' this way) but couldn't fathom it out.

'Must try harder' next time :doh:

Thanks again :beerchug:

Paul Ked