testuser448
New Member
- Joined
- Nov 25, 2015
- Messages
- 2
No doubt this question has been asked already, but I could not find it.
You can set the source data like this:
Given myChart, how can I get myRange? Unfortunately there is no Chart.GetSourceData. I want everything including row and column headings (A1:E5 in the example spreadsheet below):
<tbody>
</tbody>
You can set the source data like this:
Code:
Dim myChart As Excel.Chart
Dim myRange as Excel.Range
' Initialise chart and range objects and then
myChart.SetSourceData myRange 'myRange = A1:E5
Given myChart, how can I get myRange? Unfortunately there is no Chart.GetSourceData. I want everything including row and column headings (A1:E5 in the example spreadsheet below):
A | B | C | D | E | F | |
1 | Q1 | Q2 | Q3 | Q4 | ||
2 | Region1 | 100 | 100 | 100 | 100 | |
3 | Region2 | 200 | 200 | 200 | 200 | |
4 | Region3 | 300 | 300 | 300 | 300 | |
5 | Region4 | 400 | 400 | 400 | 400 |
<tbody>
</tbody>