P
Paul
The following code fails in the next to last line with error statement,
"Select method of point class failed"
If i use an integer rather than the variable, it works; however, I need to
use the variable to paste the line to he most recent point.
What am I doing wrong???
Sub drawline()
ActiveSheet.ChartObjects("Chart 967").Activate
ActiveChart.SeriesCollection(4).Select
xxx = ActiveChart.SeriesCollection(4).Points.Count
Range("X1").Select
ActiveSheet.Shapes("Line 969").Select
Selection.Copy
ActiveSheet.ChartObjects("Chart 967").Activate
ActiveChart.SeriesCollection(4).Select
ActiveChart.SeriesCollection(4).Points(xxx).Select
Selection.Paste
End Sub
"Select method of point class failed"
If i use an integer rather than the variable, it works; however, I need to
use the variable to paste the line to he most recent point.
What am I doing wrong???
Sub drawline()
ActiveSheet.ChartObjects("Chart 967").Activate
ActiveChart.SeriesCollection(4).Select
xxx = ActiveChart.SeriesCollection(4).Points.Count
Range("X1").Select
ActiveSheet.Shapes("Line 969").Select
Selection.Copy
ActiveSheet.ChartObjects("Chart 967").Activate
ActiveChart.SeriesCollection(4).Select
ActiveChart.SeriesCollection(4).Points(xxx).Select
Selection.Paste
End Sub