PDA

View Full Version : Solved: more chart questions....defining specific ranges to axes



divingdingo
11-28-2007, 07:53 AM
i'm doing a very simple graph from two columns of data, to get the code i recorded a macro to insert a chart and it worked fine. however whenever i run the code back, it doesn't get the axes right and the graph is all muddled

what activechart objects do i need to use to set the x axis to be one range and the y axis another?

i've tried:

activechart.Axes(xlValue).SetSourceData Source:=Range("extrapolated!$F$17:$F$21")

for the y axis and (xlcategory) for the y

but Excel doesn't like it.

can anyone steer me in the right direction please?

hugely appreciated
mark

xld
11-28-2007, 11:21 AM
ActiveChart.SeriesCollection(1).XValues = "=extrapolated!R17C6:R21C6"

divingdingo
11-29-2007, 03:30 AM
thanks xld

sometimes i'm so close....yet so far !!

thank you for your patience with me.