Chart Code problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

One of my collegues was running amacroin excel, and came up with a subscript
error.

I have tried to figure out what is wrong but my knowledge of VB is somewhat
limited - can anyone help

Here is the code

Kaart = "Chart " & y
Windows("QC kontrol udsendelse.xls").Activate
Sheets("Abnormal 1").Select
ActiveSheet.ChartObjects(Kaart).Activate
ActiveChart.SeriesCollection(1).Points(z).Select
With Selection.Border
.Weight = xlHairline
.LineStyle = xlNone
End With

The Macro stops on the following line

ActiveChart.SeriesCollection(1).Points(z).Select


Thanks in advance for any help anyone can offer.

Rgds,
Daniel
 
Hi Daniel,

Have you assigned a value to z that relates to a point in
SeriesCollection(1)

Regards,
Peter T
 
Thanks Peter,


I have discovered the problem. There was no data for the series in the chart
- therefore the Macro, couldn't find points(z)

Rgds

Daniel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top