Chart Title as a Cell in a worksheet
Tom:
To make things simple, I set up a chart and then recorded a macro to change the data
ranges (which I did with cells initially), I then subsituted a named range for the cells
as in:
Sub setparms()
'
' setparms Macro
' Macro recorded 10/02/2004 by John H Baker
'
'
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.ChartArea.Select
ActiveChart.SetSourceData Source:=data!plotdata, PlotBy:= _
xlColumns
ActiveWindow.Visible = False
Windows("ReportNameChart.xls").Activate
End Sub
Chart1 is the chart. However, it does not care for the "data!plotdata" reference, which is
sheet and named range. I also tried "plotdata" and that was not accepted either. Is this a
flaw in my syntax or am I barking up the wrong tree?
John Bakler
"Tom Ogilvy" wrote:
in the dialog for assigning ranges
=Sheetname!RangeName
or
=BookName.xls!RangeName
works for me.
|