excel shape xy poisiton in A4 paper

F

farshid farshid

I want to build a cheque print software in excel and i have a problem .
I want to draw a shape in A4 paper in the exact location for example 10cm (top) * 9 cm (left) but after printing the shape place is incorrect of A4.

my code:

topPoint = 13 'cm
leftPoint = 18 'cm

topPoint = Application.CentimetersToPoints(topPoint) - sht.PageSetup.TopMargin
leftPoint = Application.CentimetersToPoints(leftPoint) - sht.PageSetup.LeftMargin
sht.Shapes.AddShape msoShapeRectangle, leftPoint, topPoint, 10, 10

Kindly help me.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top