Hello,
I have a worksheet full of charts and I have another worksheet where I want to list each chart name, chart series name, and chart series formula for reference.
Here is what I have so far:
Please Help!
I have a worksheet full of charts and I have another worksheet where I want to list each chart name, chart series name, and chart series formula for reference.
Here is what I have so far:
Code:
Sub ListChartInfo()
Dim i As Integer
Dim wb As Workbook
Dim wsCharts As Worksheet
Dim wsList As Worksheet
Dim cht As Chart
Dim ChtSer As Series
Set wb = ThisWorkbook
Set wsCharts = wb.Worksheets("Charts")
Set wsList = wb.Worksheets("List")
'setup chart list worksheet
wsList.Select
Cells(1, 1) = "Chart Name"
Cells(1, 2) = "Series Name"
Cells(1, 3) = "Series Formula"
Range("A1:A3").Font.Bold = True
'Get chart series data
wsCharts.Select
For Each cht In wsCharts.ChartObjects
i = 2
wsList.Cells(i, 1) = cht.Name
wsList.Cells(i, 2) = ChtSer.Name
wsList.Cells(i, 3) = ChtSer.Formula
i = i + 1
Next cht
End Sub
Please Help!