I'm not sure if your really mean a ChartTitle (on a diagram?) but if you do
try something like this
Sub test()
Dim sLink As String
Dim rCell As Range
Dim cht As Chart
Dim ct As ChartTitle
Set rCell = ActiveSheet.Range("D2")
sLink = rCell.Address(, , xlR1C1, True)
Set cht = ActiveSheet.ChartObjects(1).Chart
Set ct = cht.ChartTitle
ct.Text = "=" & sLink
End Sub
Regards,
Peter T
"Trond" <(E-Mail Removed)> wrote in message
news

FC0D7DF-B92F-4853-90C1-(E-Mail Removed)...
>I have programmed a macro that makes a pivottable and a pivotdiagram. In
>this
> diagram I have a charttitle that I want to be equal to the content of one
> cell (D2).
> So if the content of the cell changes, I want the Charttitle also to
> change.
>
> Manually I can do this by selecting the charttitle and use the function
> (=D2) on the top of the excel-sheet. But this will not work when I try the
> recorder.
>
> Can anyone help?