+ Reply to Thread
Results 1 to 2 of 2

getting the x-axis value through VBA

  1. #1

    getting the x-axis value through VBA

    Hi All,

    I am facing some peculiar problem. I need to find the first x-axis
    datapoint value from the chart through VBA. That is finding the
    categoryvalue of datapoint for x -axis.

    Is their any function avilable in VBA.


    Thanxs in advance

    Syam


  2. #2
    Jon Peltier
    Guest

    Re: getting the x-axis value through VBA

    It works like this:

    Sub GetXValue

    ' declare a variant to hold the array of X values
    Dim XVals as Variant

    ' declare another variant to hold the category
    Dim X As Variant

    ' populate the array
    XVals = ActiveChart.SeriesCollection(1).XValues

    ' get the value you need
    X = XVals(1)

    ' output the value
    Debug.Print X

    End Sub

    - Jon
    -------
    Jon Peltier, Microsoft Excel MVP
    Peltier Technical Services - Tutorials and Custom Solutions -
    http://PeltierTech.com/
    2006 Excel User Conference, 19-21 April, Atlantic City, NJ
    http://peltiertech.com/Excel/ExcelUserConf06.html
    _______


    <[email protected]> wrote in message
    news:[email protected]...
    > Hi All,
    >
    > I am facing some peculiar problem. I need to find the first x-axis
    > datapoint value from the chart through VBA. That is finding the
    > categoryvalue of datapoint for x -axis.
    >
    > Is their any function avilable in VBA.
    >
    >
    > Thanxs in advance
    >
    > Syam
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1