DataLabel.Font.ColorIndex vs DataLabel.Text (Private Sub does not work in excel 2003)

G

God Itself

Hi,

i have sheet's code which works perfecly in Excel 2007, but nothing happens in excel 2003. No error occurs. what may be the cause?

Private Sub Worksheet_Calculate()

With Workbooks("chart").Sheets("tmp").Shapes("Wykres 1").DrawingObject.Chart
For i = 1 To 7
.SeriesCollection(1).Points(i).DataLabel.Font.ColorIndex = 0
Next i
For i = 1 To 7
If .SeriesCollection(1).Points(i).DataLabel.Text = "#N/D!" Then
.SeriesCollection(1).Points(i).DataLabel.Font.ColorIndex = 2
End If
Next i
End With

End Sub

regards
 

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

Top