Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
have an input box to enter the upper and lower range of sheets to print, and
use a vstring variable to select the sheets sheets(array("T1-"+t1,"T1-"+t2")) until you have your selected teams "Dan" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Printing a group of worksheets | Excel Discussion (Misc queries) | |||
Printing a group that is not grouped | Excel Discussion (Misc queries) | |||
Printing spreadsheets with values entered (group) | Excel Discussion (Misc queries) | |||
printing group of charts | Charts and Charting in Excel | |||
(new to the group) importing data into excel and printing | Excel Programming |