If the specified x,y coordinates corresponds to a point in the series then you can use the marker of the series. Use a circle marker, not filled, choose the size of the marker and the outline format.
If the specified x,y coordinates do not correspond to a point in the series add a circle shape.
Sub TestAddCircle()
Dim chto As ChartObject
Dim shp As Shape
Dim dWidth As Double, dHeight As Double, dRadius As Double
' set reference to the first chartobject in the first worksheet
Set chto = Worksheets(1).ChartObjects(1)
' the radius of the circle is a third of the smaller dimension of the chartobject
With chto
dRadius = IIf(.Width > .Height, .Width, .Height) / 3
End With
' add the circle to the chart
With chto.Chart
Set shp = .Shapes.AddShape(msoShapeOval, (chto.Width - dRadius) / 2, (chto.Height - dRadius) / 2, dRadius, dRadius)
shp.Name = "TestCircle"
End With
' Test: paints the circle in green. Uses complete reference to the circle inside the chart
Worksheets(1).ChartObjects(1).Chart.Shapes("TestCircle").Fill.ForeColor.RGB = vbGreen
End Sub
Yes, thank you. I'm running Excel 2002. That VB code did insert a circle into my chart but I don't know where to reference the X and Y axis of where I want the circle located in my chart and I don't want it filled in with color (green). I also don't know how to reference which cell I want my radius to be. I just want an outline of a circle too. Sorry I'm new to VB.
Hi
I thought you were solving the problem and had difficulties and that's why I posted the code, to get you started.
I see now that you expect someone to solve the problem for you, and that I cannot do.
Sorry, I cannot help you further.
... Apparently this simple task is impossible in excel because I have yet to find a solution.