Excel VBA Gather attributes of selected chart

Posted on 2014-08-12
Last Modified: 2014-08-16

What VBA code would I use to gather all the attributes of a chart?

In other words the XAxis, YAxis, Series Data, Chart type etc
Question by:murbro
    LVL 47

    Accepted Solution


    You could use this code and then browse the locals VBE Window

    Sub macro()
    Set chrt = ActiveChart
    chrtType = ActiveChart.ChartType
    Set chrtAxes = ActiveChart.Axes
    Set chrtSeries = ActiveChart.SeriesCollection
    End SubEE
    EDIT edited code

    Author Closing Comment

    Thanks very much

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    Suggested Solutions

    A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
    Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
    This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
    This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now