G
Guest
I have a program that I am putting together...it allows a user to use a ToggleButton to print out a variable number of pages depending on how many products have been chosen.
The problem is when the pages print, they come out by individual product, not collated sets (e.g., if I want to print six copies of each product it will print out six copies of product number one, six of number two and so on). I want to be able to print them in order (e.g., one of product one, one of product two, etc…so that eventually six full sets are printed out).
Here are the string of commands that I have so far...its long but repetitive. The various sub routines are only used depending on how many products have been selected up to a maximum of six (i.e., one P&L per product * six products).
This is confusing stuff to write about so please let me know if you need further clarificatio
Private Sub CommandButton1_Click(
If Sheets("Start").ToggleButton1.Value = True The
Sheets("P&L").Selec
Sheets("P&L").Range("D2:F52").Selec
ActiveSheet.PageSetup.PrintArea = "$D$2:$F$52
Sheets("P&L").Selec
Sheets("P&L").Range("B2").Selec
ActiveWindow.SelectedSheets.PrintOut Copies:=Range("E5").Value, Collate:=Tru
End I
If Sheets("Start").ToggleButton2.Value = True The
Sheets("P&L").Selec
Sheets("P&L").Range("I2:K52").Selec
ActiveSheet.PageSetup.PrintArea = "$I$2:$K$52
Sheets("P&L").Selec
Sheets("P&L").Range("B2").Selec
ActiveWindow.SelectedSheets.PrintOut Copies:=Range("E5").Value, Collate:=Tru
End I
If Sheets("Start").ToggleButton3.Value = True The
Sheets("P&L").Selec
Sheets("P&L").Range("N252").Selec
ActiveSheet.PageSetup.PrintArea = "$N$2:$P$52
Sheets("P&L").Selec
Sheets("P&L").Range("B2").Selec
ActiveWindow.SelectedSheets.PrintOut Copies:=Range("E5").Value, Collate:=Tru
End I
If Sheets("Start").ToggleButton4.Value = True The
Sheets("P&L").Selec
Sheets("P&L").Range("S2:U52").Selec
ActiveSheet.PageSetup.PrintArea = "$S$2:$U$52
Sheets("P&L").Selec
Sheets("P&L").Range("B2").Selec
ActiveWindow.SelectedSheets.PrintOut Copies:=Range("E5").Value, Collate:=Tru
End I
If Sheets("Start").ToggleButton5.Value = True The
Sheets("P&L").Selec
Sheets("P&L").Range("X2:Z52").Selec
ActiveSheet.PageSetup.PrintArea = "$X$2:$Z$52
Sheets("P&L").Selec
Sheets("P&L").Range("B2").Selec
ActiveWindow.SelectedSheets.PrintOut Copies:=Range("E5").Value, Collate:=Tru
End I
If Sheets("Start").ToggleButton6.Value = True The
Sheets("P&L").Selec
Sheets("P&L").Range("AC2:AE52").Selec
ActiveSheet.PageSetup.PrintArea = "$AC$2:$AE$52
Sheets("P&L").Selec
Sheets("P&L").Range("B2").Selec
ActiveWindow.SelectedSheets.PrintOut Copies:=Range("E5").Value, Collate:=Tru
End I
Sheets("Print Instructions").Selec
Sheets("Print Instructions").Range("C2").Selec
End Sub
The problem is when the pages print, they come out by individual product, not collated sets (e.g., if I want to print six copies of each product it will print out six copies of product number one, six of number two and so on). I want to be able to print them in order (e.g., one of product one, one of product two, etc…so that eventually six full sets are printed out).
Here are the string of commands that I have so far...its long but repetitive. The various sub routines are only used depending on how many products have been selected up to a maximum of six (i.e., one P&L per product * six products).
This is confusing stuff to write about so please let me know if you need further clarificatio
Private Sub CommandButton1_Click(
If Sheets("Start").ToggleButton1.Value = True The
Sheets("P&L").Selec
Sheets("P&L").Range("D2:F52").Selec
ActiveSheet.PageSetup.PrintArea = "$D$2:$F$52
Sheets("P&L").Selec
Sheets("P&L").Range("B2").Selec
ActiveWindow.SelectedSheets.PrintOut Copies:=Range("E5").Value, Collate:=Tru
End I
If Sheets("Start").ToggleButton2.Value = True The
Sheets("P&L").Selec
Sheets("P&L").Range("I2:K52").Selec
ActiveSheet.PageSetup.PrintArea = "$I$2:$K$52
Sheets("P&L").Selec
Sheets("P&L").Range("B2").Selec
ActiveWindow.SelectedSheets.PrintOut Copies:=Range("E5").Value, Collate:=Tru
End I
If Sheets("Start").ToggleButton3.Value = True The
Sheets("P&L").Selec
Sheets("P&L").Range("N252").Selec
ActiveSheet.PageSetup.PrintArea = "$N$2:$P$52
Sheets("P&L").Selec
Sheets("P&L").Range("B2").Selec
ActiveWindow.SelectedSheets.PrintOut Copies:=Range("E5").Value, Collate:=Tru
End I
If Sheets("Start").ToggleButton4.Value = True The
Sheets("P&L").Selec
Sheets("P&L").Range("S2:U52").Selec
ActiveSheet.PageSetup.PrintArea = "$S$2:$U$52
Sheets("P&L").Selec
Sheets("P&L").Range("B2").Selec
ActiveWindow.SelectedSheets.PrintOut Copies:=Range("E5").Value, Collate:=Tru
End I
If Sheets("Start").ToggleButton5.Value = True The
Sheets("P&L").Selec
Sheets("P&L").Range("X2:Z52").Selec
ActiveSheet.PageSetup.PrintArea = "$X$2:$Z$52
Sheets("P&L").Selec
Sheets("P&L").Range("B2").Selec
ActiveWindow.SelectedSheets.PrintOut Copies:=Range("E5").Value, Collate:=Tru
End I
If Sheets("Start").ToggleButton6.Value = True The
Sheets("P&L").Selec
Sheets("P&L").Range("AC2:AE52").Selec
ActiveSheet.PageSetup.PrintArea = "$AC$2:$AE$52
Sheets("P&L").Selec
Sheets("P&L").Range("B2").Selec
ActiveWindow.SelectedSheets.PrintOut Copies:=Range("E5").Value, Collate:=Tru
End I
Sheets("Print Instructions").Selec
Sheets("Print Instructions").Range("C2").Selec
End Sub