I would like to know the coordinates (in pixels) of the vertices of the grid area of a chart on the screen.
I thought that the plot area coincided with the grid area and therefore I tried to draw a plotarea rectangle, but the two figures were not overlapped, but staggered.
VBA Code:
Code
Set ac = ActiveSheet.ChartObjects(ActiveChartName$)Set pa = ActiveSheet.ChartObjects(ActiveChartName$).Chart.PlotAreaActiveSheet.Shapes.AddShape(msoShapeRectangle, ac.Left + pa.InsideLeft, ac.Top + pa.InsideTop, pa.InsideWidth, pa.InsideHeight).Select
Result (red line):
[ATTACH=CONFIG]68910[/ATTACH]
I would begrateful if you could tell me the correct code
Thanks foryour help