ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Print Copies in with statement? (https://www.excelbanter.com/excel-programming/273582-re-print-copies-statement.html)

Ron de Bruin

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




Ron de Bruin

Print Copies in with statement?
 
Yes

Why do you want to see the PrintPreview first?


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



"Bruce Roberson" wrote in message ...
So, I guess how this affects me is that I have to get out
of the habit of choosing "Print" from the print preview
window, unless I want 1 more copy than what I planned on.

If I want only the number of copies I specify there, then
I need to select "close" from the print preview window,
right?

Bruce

-----Original Message-----
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



.




Bruce Roberson[_2_]

Print Copies in with statement?
 
I want to see the print preview first to make sure its what I intended to
print and that it is laid out correctly. Just a quirk of mine I guess <VBG
"Ron de Bruin" wrote in message
...
Yes

Why do you want to see the PrintPreview first?


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



"Bruce Roberson" wrote in message

...
So, I guess how this affects me is that I have to get out
of the habit of choosing "Print" from the print preview
window, unless I want 1 more copy than what I planned on.

If I want only the number of copies I specify there, then
I need to select "close" from the print preview window,
right?

Bruce

-----Original Message-----
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



.







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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com