Derek/Jon,
I have a very similar problem which may help/hinder. I have a line chart
which consists of 6 series. The sixth series and title of the chart is
'controlled' by a macro. The macro is in turn operated via a button. Each
series consists of 4 values. When the macro is run, the sixth series loses
the series name (=Sheet2!#REF!), and the last value ie the values decrease
from Sheet2!$F$22:$F$25 to Sheet2!$F22:$F$24. Subsequently activiation of the
macro decreases the values by 1 each time ( ie $23, $22, and so on until the
values = Sheet2!#REF!
Macro code
parameter1 = "="
parameter2 = "BEBINGTON & WEST WIRRAL"
parameter3 = "Coverage (less than 5 years since last adequate test) for the
period 2001-2005. Target 80%"
Call PCO(parameter1, parameter2, parameter3)
the first two parameters amend autofilter parameters. the third amends the
title of the chart
Sub PCO(p1, p2, p3)
Sheets("Sheet1").Select
Selection.AutoFilter
Selection.AutoFilter
Sheets("Sheet1").Select
Selection.AutoFilter Field:=1, Criteria1:=p1
Cells.Select
Selection.Copy
Sheets("Sheet2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Sheets("Sheet1").Select
Selection.AutoFilter
Selection.AutoFilter
Selection.AutoFilter Field:=3, Criteria1:=p2
Cells.Select
Selection.Copy
Sheets("Sheet2").Select
Range("A22").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Rows("22:22").Select
Selection.Delete
Range("A1").Select
Sheets("Chart1").Select
Call charttitle(p3)
End Sub
Filters and copies values from 1 sheet to another from which the chart is
produced. Row 22 is deleted because that contains the column titles - all the
data is copied over correctly, but the chart is incorrect ???
Hope this helps. any suggestions
Mike