Consulting

Results 1 to 3 of 3

Thread: Solved: more chart questions....defining specific ranges to axes

  1. #1

    Solved: more chart questions....defining specific ranges to axes

    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

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    [vba]

    ActiveChart.SeriesCollection(1).XValues = "=extrapolated!R17C6:R21C6"
    [/vba]
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    thanks xld

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

    thank you for your patience with me.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •