Thread: GROUP PRINTING
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default GROUP PRINTING

Dim varr as variant, varr1() as String
Dim res as Long
varr = Array("T1-02", "T1-03", "T1-04", "T1-05", _
"T1-06", "T1-07", "T1-08")
res = InputBox("how many people on the team?")
Redim varr1(0 to res - 1)
for i = 0 to res - 1
varr1(i) = varr(i)
Next
Sheets(varr1).Select
Sheets("T1-02").Activate
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Sheets("Team 1").Select

--
Regards,
Tom Ogilvy

"Dan" wrote in message
...
I have four groups with three teams with different amount of people on the
teams my current code using team 1 as an example is:

Sheets(Array("T1-02", "T1-03", "T1-04", "T1-05", "T1-06", "T1-07",
"T1-08")).Select
Sheets("T1-02").Activate
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Sheets("Team 1").Select

problem is those who have less get the form with no data. My question is

can
I get a message box to enter the number of people on the team and print

that?
and how 3 ppl = T1-01 to T1-03, 8 ppl is as you see above. Much thanks
appreciated