ScottInTexas
Board Regular
- Joined
- Oct 28, 2003
- Messages
- 178
One worksheet is set up to fit 10 labels on a sheet. If you run Worksheet.Printout the output will fit the Avery Labels. Sometime we need 100 labels or more, meaning we need a multi-page print job. I want to send all of the pages as one print job instead of 10. Is there a way to do that? All I can see is "Printout" and that prints the print area as a single print job. The code below is what I have now. It generates multiple print jobs as you can see.
Thanks for the help.
Code:
Sub PrintThem(ByVal first As Long, ByVal last As Long)
Dim i As Long
Dim wksht As Worksheet
Set wksht = Sheets("Label Template")
For i = first To last
If i < last Then Range("B4").value = i
If i + 1 <= last Then wksht.Range("B11").value = i + 1
If i + 2 <= last Then wksht.Range("B18").value = i + 2
If i + 3 <= last Then wksht.Range("B25").value = i + 3
If i + 4 <= last Then wksht.Range("B32:J32").value = i + 4
Sleep 1000
wksht.PrintOut Copies:=1, Preview:=False
DoEvents
If IsCanceled Then
Exit For
End If
ClearForm
i = i + 4
Next
Set wksht = Nothing
End Sub
Thanks for the help.