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

  • Thread starter Almagg via OfficeKB.com
  • Start date
A

Almagg via OfficeKB.com

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
 
D

Dave Peterson

Application.Dialogs(xlDialogPrinterSetup).Show


Almagg via OfficeKB.com said:
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
 
A

Almagg via OfficeKB.com

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.
 
A

Almagg via OfficeKB.com

the code for 11"x17" is:

PaperSize = xlPaperTabloid

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

working fine now

thanks.
 
Top