by Jessy Butzke (11 Submissions)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sun 6th August 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Shows how to center a word and send to the printer.
Dim strWord As String
Dim intPos As Integer
strWord$ = Text1.Text$
intPos = Len(strWord$)
Printer.Font.Name = "Times New Roman"
Printer.Font.Size = 12
intPos = (116 - intPos) / 2
Printer.Print Spc(intPos); strWord$
Printer.EndDoc
End Sub