Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Printing worksheets
Private Sub PRINT_PCW_Click()
Dim Vio_Num As Integer Vio_Num = Sheets("Summary").Range("H13").Value Sheets("Summary").PageSetup.PrintArea = "$A$1:$J$57" Sheets("Comphist").PageSetup.PrintArea = "$A$1:$L$35" If Vio_Num 0 Then Sheets("V1").PageSetup.PrintArea = "$A$1:$L$52" Sheets("EB1").PageSetup.PrintArea = "$A$1:$H$32" WorkSheets(Array("Summary","Comphist","V1","EB1")) .Printout _ Copies:=1, Collate:=True Else WorkSheets(Array("Summary","Comphist")).PrintOut _ Copies:=1, Collate:=True End If End Sub -- Regards, Tom Ogilvy "Brent" wrote in message ... I am trying to write a program that will print out sheets depending on a number in a cell on the first sheet. I want the pages printed to be duplexed, but can only get them to come out single sided. any suggestions? here is the code for the first for sheets. Private Sub PRINT_PCW_Click() Dim Vio_Num As Integer Vio_Num = Sheets("Summary").Range("H13").Value Sheets("Summary").PageSetup.PrintArea = "$A$1:$J$57" Sheets("Summary").Select ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True Sheets("Comphist").PageSetup.PrintArea = "$A$1:$L$35" Sheets("Comphist").Select ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True If Vio_Num 0 Then Sheets("V1").PageSetup.PrintArea = "$A$1:$L$52" Sheets("V1").Select ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True Sheets("EB1").PageSetup.PrintArea = "$A$1:$H$32" Sheets("EB1").Select ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Printing worksheets | Excel Discussion (Misc queries) | |||
Printing Most but not all worksheets | Excel Discussion (Misc queries) | |||
printing worksheets | Excel Discussion (Misc queries) | |||
Printing? Worksheets not printing the same on multiple pc's! | Excel Programming | |||
Printing Worksheets thru VBA | Excel Programming |