View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
farshid farshid farshid farshid is offline
external usenet poster
 
Posts: 1
Default excel shape xy poisiton in A4 paper


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.