Using the below code to print a border along all sides of report. The line draws correctly on my pc (Win 7, Office 2010 SP1) but the top line is little above the desired the location and intersects an image in the page header section on target pc (Win8, Office 2010). For testing purpose, tried with a blank report and multiple lines changing the sngTop to Me.ScaleTop + 450/ 550 /650 /750. It seems that the top lines are more closely spaced then that of my PC.
What am I missing ? Why should this behaviour change ? What setting should I look at to rectify ?
Code:
Private Sub Report_Page()
Dim sngTop As Single, sngLeft As Single
Dim sngWidth As Single, sngHeight As Single
Me.ScaleMode = 3
sngTop = Me.ScaleTop + 450
sngLeft = Me.ScaleLeft + 55
sngWidth = Me.ScaleWidth - 85
sngHeight = Me.ScaleHeight - 20
Me.Line (sngLeft, sngTop)-(sngWidth, sngHeight), vbBlack, B
End Sub