Rich (BB code):
Private Sub Image17_Click()
If Val(Me.LNRC.Caption) > 0 Then
Screen.MousePointer = vbHourglass
With Me.MSFlexGrid6
Printer.Font = "Consolas"
Printer.Font.Size = 9
'THIS IS THE TITLE
Printer.Print vbCrLf
Printer.Print " PREVISIONI DEL LOTO " & vbCrLf & " _______________________________________________________________________"
'THIS IS THE TITLE
For I = 1 To Val(Me.LNRC.Caption) - 1
'Left(.TextMatrix(I, 0) & Space(11), 11)
Printer.Print " " & Left(.TextMatrix(I, 0) & Space(9), 9) & " " & .TextMatrix(I, 1) & " " & Format(.TextMatrix(I, 2), "DD/MM/YYYY") & " " & Format(.TextMatrix(I, 3), "#00") & " " & Format(.TextMatrix(I, 4), "#00") & " " & Format(.TextMatrix(I, 5), "#00") & " " & Format(.TextMatrix(I, 6), "#00") & " " & Format(.TextMatrix(I, 7), "#00") & " " & Format(.TextMatrix(I, 8), "#00") & " " & Format(.TextMatrix(I, 9), "#00") & " " & Format(.TextMatrix(I, 10), "#00") & " " & Format(.TextMatrix(I, 11), "#00") & " " & Format(.TextMatrix(I, 12), "#00") & " " & Format(.TextMatrix(I, 13), "#00")
Next I
End With
Printer.EndDoc
Screen.MousePointer = vbDefault
Else
Beep
Me.LAZIONI.Caption = "PROSPETTO VUOTO!"
DoEvents
Sleep (1500)
Me.LAZIONI.Caption = ""
End If
End Sub
OK, but i need to print the title on each page if the number of pages are more than one...