VBA quick print function?

R

Robert Crandal

Does VBA have any functions that will immediately print a
range of cells that I specify? I'm interested in a function
that will immediately send a print job to the printer. I don't
want to show the user the standard "Print" dialog box which
lets them change the printer or the page range. I just want
the print function to immediately send the spreadsheet contents
to the default printer.

Also, our spreadsheet has a "page range" of ten pages. Is
there a function that lets me choose how many pages to
print??

Thank you!
 
A

Auric__

Robert said:
Does VBA have any functions that will immediately print a
range of cells that I specify? I'm interested in a function
that will immediately send a print job to the printer. I don't
want to show the user the standard "Print" dialog box which
lets them change the printer or the page range. I just want
the print function to immediately send the spreadsheet contents
to the default printer.

Also, our spreadsheet has a "page range" of ten pages. Is
there a function that lets me choose how many pages to
print??

Check the PrintOut method. For a range of cells:
Range("A1:B2").PrintOut

For the entire workbook, pages 2 to 4:
ActiveWorkbook.PrintOut From:=2, To:=4

Check the helpfile for more parameters.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top