Thanks for all your help.
irlblinky I thought it would be possible to instead to do something like:
Dim rng As Ranges
Ranges.Item(1)=("A1:B4")
Ranges.Item(2)=("C1:D4")
for all ranges
Charts.Add
ActiveChart.ChartType = xlPie
ActiveChart.SetSourceData Source:=rng(i)...
Oh yeh I have qualified the source bk elsewhere. Thanks.
Wouldn't that change my original graph? What I need is multiple graphs all with the same formatting but displaying different data.
So far I have:
Dim rng As Range
Set rng = Sheets("DL3").Range("B1:F28")
With bk.Worksheets("DL3 Critical").ChartObjects.Add _
(Left:=0, Width:=500, Top:=0, Height:=300)
.Chart.SetSourceData Source:=rng
End With
This code makes one graph...
Hi,
I want to create multiple graphs in Excel of the same style but with different ranges of data. My plan was to set up a ranges collection that stores a list of ranges. I could then loop through and create a new graph for each one. However I cannot find a way to add values to a ranges object...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.