A
Andreww
Hi - I have a report that has a chart in it. Every time the use
changes the dimensions / measures of the report grid, I want the chart
to reflect that change. At the moment I can't see how to even delete
my chart and then recereate it with different data range.
Sub make_chart()
Charts.Add
ActiveChart.ChartType = xlLine
ActiveChart.SetSourceData Source:=Sheets("Detail").Range("B7:H9"),
PlotBy:= _
xlRows
ActiveChart.Location Where:=xlLocationAsObject, Name:="Detail"
With ActiveChart
.HasTitle = False
.Axes(xlCategory, xlPrimary).HasTitle = False
.Axes(xlValue, xlPrimary).HasTitle = False
End With
End Sub
Ideally I would like to get some code that means the chart is updated
and when the report grid changes, if that's a lot of grief then just
being able to delete existing chart and then define a new one would
do.
Any help appreciated.
Thanks
Andrew
changes the dimensions / measures of the report grid, I want the chart
to reflect that change. At the moment I can't see how to even delete
my chart and then recereate it with different data range.
Sub make_chart()
Charts.Add
ActiveChart.ChartType = xlLine
ActiveChart.SetSourceData Source:=Sheets("Detail").Range("B7:H9"),
PlotBy:= _
xlRows
ActiveChart.Location Where:=xlLocationAsObject, Name:="Detail"
With ActiveChart
.HasTitle = False
.Axes(xlCategory, xlPrimary).HasTitle = False
.Axes(xlValue, xlPrimary).HasTitle = False
End With
End Sub
Ideally I would like to get some code that means the chart is updated
and when the report grid changes, if that's a lot of grief then just
being able to delete existing chart and then define a new one would
do.
Any help appreciated.
Thanks
Andrew