How can i access to XValue & YValue for selected point?
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: How can i access to XValue & YValue for selected point?

  1. #1
    Board Regular
    Join Date
    Feb 2002
    Location
    Calgary Canada
    Posts
    222
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    Dear Mr Excel (or Mr. Macro)

    I am very glad that finally I could find a very good site about excel...........

    I have written program in Excel(VBA). For my work I need to access to X value & Y value for a point in excel chart.
    I know all the values in the series are in "AtiveChart.SeriesCollection(1).Values" and all x values for a chart series are in "AtiveChart.SeriesCollection(1).XValues", and also "Point(index)" represents a single point in a series in a chart.
    But when I select a point (not select a chart) I can not access the its INDEX , its Value(Y) and its XValue(X).
    How can I access them?

    Thanks for your good site.
    Best wishes for you and also Mr. Excel's


    P.S.: Also I have sent this E-mail to consult@MrExcel.com

  2. #2
    Board Regular
    Join Date
    Mar 2002
    Location
    Brampton
    Posts
    328
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Values and XValues are properties of the Series object, which is an object of the SeriesCollection collection. These properties return or set an array of values or xvalues (not a single value). Remember that when you select a series, all points are selected, not being possible to select singular points.
    On the other hand, by using Points method of the Series object, you access a singular point, based on an index as in:

    SeriesCollection(1).Points(1)

    I would recommend to use always Microsoft Visual Basic Help when in doubt or not clear how to access certain properties or methods of different objects. That is one of the biggest challenges in Excel programming.

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com