View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] rmblazei@hotmail.com is offline
external usenet poster
 
Posts: 3
Default worksheet grouping, Sheets(Array... property

I have the following bit of code that J-walk.com graciously makes
available on its batch printer tool:

' Begin routine
For i = 0 To ListBox1.ListCount - 1
If ListBox1.Selected(i) Then
With Sheets(ListBox1.List(i))
.PrintOut Copies:=NumberCopy.Text, Collate:=True
End With
End If
Next i

This works great if you want individual printouts, but I would like to
modify it to group the selected worksheets and then print as one job
(so that auto page numbers will be sequential). I believe I need to
use the Sheets(Array(... property with the .Select property prior to
the .PrintOut property, but I cannot figure out how to arrange it after
many attempts. I am very much a newbie when it comes to VBA. Any help
is appreciated and thank you in advance.

xl2003
winxppro