Set rng = Sheets("Before").Range("B1:B11")
Set rng2 = Sheets("After").Range("B1:B11")
'create chart
Set cht = Sheets("Plot").Shapes.AddChart2
'Give chart some data
cht.Chart.SetSourceData Source:=rng
cht.Chart.SetSourceData Source:=rng2
when I using this two code:
cht.Chart.SetSourceData Source:=rng
cht.Chart.SetSourceData Source:=rng2
the first chart is draw but it is replace by the second chart. How to combine two chart into one diagram?
I already try declare one variable to add the two chart. But it is unsuccessful.