View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
hturk hturk is offline
external usenet poster
 
Posts: 11
Default Error 1004 when programming DataLabels.Position

It worked fine thank you very Much

Harry

"hturk" wrote:

Alok

Thanks I will try tommorrow morning and I will let you know how it went.

How can I found out which constants apply to which charts.

Thank You Very Much
Harry

"Alok" wrote:

Harry

Try the constant xlLabelPositionInsideEnd

Alok

"hturk" wrote:

You are correct. What would I need to do to position the datalabels above
each point for the columns.

Harry

"Alok" wrote:

You are probably trying to specify the position for a column chart type. That
constant (xlLabelPositionAbove) is valid for line graph but is not acceptable
for column chart type.

Alok

"hturk" wrote:

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.