How to get Excel Chart Title source?
I can set an Excel Chart title to a range or a named range with VBA but if I inqiure I just get the actual value. How to find out what the Title reference is if there is one?
Code:
ActiveChart.ChartTitle.Text = "=Test1!R3C10"
ActiveChart.ChartTitle.Text = "=Sheet1!ChtTitle"
Debug.Print ActiveChart.ChartTitle.Text '==> Derivative
Re: How to get Excel Chart Title source?
Code:
Sub chartit()
Dim myChart As Chart
Dim mySheet As Worksheet
Set mySheet = ActiveSheet
Set myChart = mySheet.ChartObjects(1).Chart
MsgBox myChart.ChartTitle.Formula
End Sub
Re: How to get Excel Chart Title source?
Thanks. Even though the target platform was MsOf10 (work) I was using MsOf03 (home) for debug. It works OK on MsOf10 but not on MsOf03 (Object doesn't support this property). Any idea how to get chart title formula w/ MsOf03? I'm guessing it's not possible. I see nothing in the object model that would seem to work.