ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Application.Dialogs(xlDialogPrint).Show - prints too soon (https://www.excelbanter.com/excel-discussion-misc-queries/140763-application-dialogs-xldialogprint-show-prints-too-soon.html)

Almagg via OfficeKB.com

Application.Dialogs(xlDialogPrint).Show - prints too soon
 
using the above causes the printing to begin immediately

i just want the user to be able to set the printer.
the reason is i am setting up the print settings in the code.
one of which is 11"x17" paper and the correct printeer has to be selected.
if it isn't there is an error when the program reaches that line.

thanks

--
Message posted via http://www.officekb.com


Dave Peterson

Application.Dialogs(xlDialogPrint).Show - prints too soon
 
Application.Dialogs(xlDialogPrinterSetup).Show


"Almagg via OfficeKB.com" wrote:

using the above causes the printing to begin immediately

i just want the user to be able to set the printer.
the reason is i am setting up the print settings in the code.
one of which is 11"x17" paper and the correct printeer has to be selected.
if it isn't there is an error when the program reaches that line.

thanks

--
Message posted via http://www.officekb.com


--

Dave Peterson

Almagg via OfficeKB.com

Application.Dialogs(xlDialogPrint).Show - prints too soon
 
not quite.

i selected the printer, but when the code reached the 11"x17" paper setting
there was an error message. your suggested code seems like it does not set
it as the default printer.

initially i was using:

Application.ActivePrinter = "\\JBXSl05\JBX_LD160C_R1880 on Ne04:"

With Sheets("ProjIdRollUp").PageSetup
.PrintTitleRows = "$1:$5"
.LeftFooter = "&8&Z&F&A"
.CenterFooter = "&8&D"
.RightFooter = "&8&P of &N"
.CenterHorizontally = True
.Orientation = xlLandscape
.PaperSize = xlPaper11x17
.PaperSize = xlPaperTabloid
.Order = xlOverThenDown
.Zoom = 69
End With

which worked, but that was when i thought only my guy was going to use it
here but it is going to be sent to others. and when it gets to the
'PaperSize' i get an error message.

--
Message posted via http://www.officekb.com


Almagg via OfficeKB.com

Application.Dialogs(xlDialogPrint).Show - prints too soon
 
the code for 11"x17" is:

.PaperSize = xlPaperTabloid

in fact this line was right below the one i had: xlPaper11x17

working fine now

thanks.

--
Message posted via http://www.officekb.com



All times are GMT +1. The time now is 07:43 PM.

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