Hi Andy - I think I've cracked it using the Yaxis.left plus pointwidth *
point number...
Dim cell As Range
x = 1
a = 0
ActiveSheet.ChartObjects("Chart 1").Activate
myPointwidth = ActiveChart.Axes(xlCategory, xlPrimary).Width /
ActiveChart.SeriesCollection(1).Points.Count
For Each cell In Range("D38:D67")
If cell = "" Then Exit For
ActiveChart.Shapes("mySpacer").Left = ActiveChart.Axes(xlValue,
xlPrimary).Left + (myPointwidth * a)
ActiveSheet.Shapes("pic" & x).Cut
With ActiveChart
.Paste
With .Shapes.Range(Array("pic" & x, "mySpacer"))
.Align msoAlignBottoms, False
.Align msoAlignRights, False
.Align msoAlignCenters, False
.Align msoAlignMiddles, False
End With
End With
x = x + 1
a = a + 1
Next
End Sub
"Andy Pope" wrote:
Hi,
You will need to calculate the position using other information in the chart
that does return a Left/Top/Width/Height property.
Can you provide a little more information such as chart type, how should the
shape be positioned vertically.
And which xl version are you using?
Cheers
Andy
--
Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Trevor Williams" wrote in
message ...
Hi All
I'm trying to align a rectangle (called mySpacer) with the Left edge of
Point(x) in a SeriesCollection. The following line of code returns error
438
so I'm presuming
the 'Points' object doesn't have a Left value.
ActiveChart.Shapes("mySpacer").Left =
ActiveChart.SeriesCollection(1).Point(x).Left
Can you steer me in the right direction?
(I've looked at Jon Peltier's site but can't see anything obvoius.)