itchyII
MIS
- Apr 10, 2001
- 167
Hello all,
How can I retrieve the chart numbet of a named chart. If I have a chart named 'Public', I want to know what the chart number is.
Or better still, how could I set the source data of a chart using the name of the chart to identify it. I currently have:
wks.ChartObjects(1).Chart.SetSourceData Source:=wks.Range("A2
" & x + 1)
but the problem is, it would seem that my chart reference numbers have changed on my worksheet (the workbook is used as a template and is copied and saved frequently, I don't know if that is the problem but I have 18 charts on a sheet and the chart numbers, mysteriousely, are no longer sequential!)
So, I have tried:
wks.ChartObjects("Public").Chart.SetSourceData Source:=wks.Range("A2
" & x + 1)
but this doesn't work.
How van I do this?
ItchyII
How can I retrieve the chart numbet of a named chart. If I have a chart named 'Public', I want to know what the chart number is.
Or better still, how could I set the source data of a chart using the name of the chart to identify it. I currently have:
wks.ChartObjects(1).Chart.SetSourceData Source:=wks.Range("A2
but the problem is, it would seem that my chart reference numbers have changed on my worksheet (the workbook is used as a template and is copied and saved frequently, I don't know if that is the problem but I have 18 charts on a sheet and the chart numbers, mysteriousely, are no longer sequential!)
So, I have tried:
wks.ChartObjects("Public").Chart.SetSourceData Source:=wks.Range("A2
but this doesn't work.
How van I do this?
ItchyII