LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing worksheets Emma_D[_2_] Excel Discussion (Misc queries) 0 February 12th 09 04:26 PM
Printing Most but not all worksheets JeffH Excel Discussion (Misc queries) 1 August 1st 07 09:45 PM
printing worksheets Graham7979 Excel Discussion (Misc queries) 1 May 29th 06 09:12 PM
Printing? Worksheets not printing the same on multiple pc's! 43fan Excel Programming 2 April 29th 04 02:34 PM
Printing Worksheets thru VBA abxy[_27_] Excel Programming 3 February 19th 04 05:34 PM


All times are GMT +1. The time now is 09:37 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"