Error 1004 when programming DataLabels.Position
When I use this code that I get from Excel VBA 2002 I get an error 1004.
Dim se as Series
Dim pts as Points
Dim pt as Point
Set se = ActiveChart.SeriesCollection(2)
se.HasDataLabels = True
Set pts =se.Points
For each pt in pts
pt.datalabel.posiotion = xlLOabelPositionAbove - error 1004 happens
here.
next pt
Does anyone have an idea as to what I am doing wrong.
|