View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Print Copies in with statement?

Printpreview and Printout are not a part of the PageSetup

If you only want to print the range SHAUGATHCHG use
this line then

.Range("SHAUGATHCHG").PrintOut Copies:=1


Sub Print_Gathering_Detail()
With Sheets("Gath_Chg").PageSetup
.PaperSize = xlPaperLegal
.FitToPagesWide = 1
.FitToPagesTall = 1
.Orientation = xlLandscape
End With

With Sheets("Gath_Chg")
.Range("SHAUGATHCHG").PrintPreview
.PrintOut Copies:=3
End With
End Sub




--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Bruce Roberson" wrote in message ...
I want to see if I can put the number of copies I want
printed in a macro with Sheets statement. The line below
is a recorded statement when I chose to change the number
of copies to 3. And I if I run this macro below, it prints
it out before it gets to print preview. I want to print
preview first. I tried ".copies = 3" in the With sheets
section, but Visual Basic balked at the syntax.

Sub Print_Gathering_Detail()

With Sheets("Gath_Chg").PageSetup
.PaperSize = xlPaperLegal
.FitToPagesWide = 1
.FitToPagesTall = 1
.Orientation = xlLandscape
End With
ActiveWindow.SelectedSheets.PrintOut Copies:=3
Range("SHAUGATHCHG").PrintPreview