View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Barb Reinhardt Barb Reinhardt is offline
external usenet poster
 
Posts: 3,355
Default Excel 2007 - Legend.Position

I have the following code that sets the Legend position for a chart object

For Each objCht In WS.ChartObjects
With objCht.Chart
.Legend.Position = xlLegendPositionBottom
End With
Next

It stops on the .legend.position line with the error

Run-time error '-217467259 (80004005)':

Method 'Position' of object 'Legend' failed.

But then I can step right through the code without a problem. What gives?

Thanks,
Barb Reinhardt