I know how to set a charts source data using VBA as in:
But how do I return with VBA the range used on the sheet for the source data?
What I'm looking for is a string to be returned along the lines of:
='AHU #5 (TC-B) Supply Air Temp'!$U$4:$V$22
which would tell me the range on the sheet used by the graph on the sheet for it's source data.
Is this possible?
Code:
With ActiveSheet.ChartObjects("Chart 1").Chart
.SetSourceData Source:=ActiveSheet.Range(Cells(4, 22), Cells(I - 1, 22)), _
PlotBy:=xlColumns
End With
But how do I return with VBA the range used on the sheet for the source data?
What I'm looking for is a string to be returned along the lines of:
='AHU #5 (TC-B) Supply Air Temp'!$U$4:$V$22
which would tell me the range on the sheet used by the graph on the sheet for it's source data.
Is this possible?