#Printer Positioning
O.K people, here's the routine:
Sub PrintHeader (Header As String)
Dim PageNo As String
Printer.CurrentX = 0
Printer.Print Date$;
Printer.CurrentX = (Printer.Width – Printer.TextWidth(Header))
Printer.CurrentX = Printer.CurrentX / 2
Printer.Print Header;
PageNo = "Page: " + Format$(Printer.Page, "###")
Printer.CurrentX = Printer.Width – Printer.TextWidth(PageNo)
Printer.Print PageNo
Printer.Print " "
End Sub
As I see it, this should print the date on the left edge of the page, the
string Header should print in the center, and the string PageNo should
print on the right edge. BUT, Header prints just off center, and only "Pa"
prints on the right edge.
Any geniuses out there that can figure this one out?
Bryon Scott
There are 2 Replies.