Chart Shape in wrong position

 

I am trying to position a shape in a chart in Excel through VBA and although I have set the parameters of the position correct the result is the shape in a different position, slightly different but different.

I have searched the Internet but I have not found a satisfying answer as to why this happens.

For example I use this code

Set shpRect = Chart1.Shapes.AddShape(msoShapeRectangle, 50, 75, 250, 175)

and it generates a rectangle but not in the 50, 75 position but in the position 60,80 etc.

Do you know a fix for this problem?

 

By: LV

Leave a Reply

Your email address will not be published. Required fields are marked *