![]() |
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 |
Printing worksheets
Thank you!! Is there a way to force two-sided printing?
|
Printing worksheets
The easiest way would be to define another print driver configured to print
two sided, then select this print driver. after that, you get into the realm of using the API to control the printer. http://msdn.microsoft.com/archive/de...softAccess.asp might give you some insights (although this is for Access - the API parts should be the same) -- Regards, Tom Ogilvy "Brent" wrote in message ... Thank you!! Is there a way to force two-sided printing? |
All times are GMT +1. The time now is 07:38 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com