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.
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.