print property

G

Guest

Is there anyway to put code behind the print button.

I want the program to auto select ranges and print off that area when the
print button is pressed without having to go in a set the , print area, page
setup, fit to one page for four different parts of a worksheet. Is this
possible?

Thanks,
 
B

Bob Umlas

Right-click the excel LOGO near the File menu, select View Code, on the left
dropdown select Workbook, in the right dropdown, select Before Print, and
enter whatever code you want there. The stub is:

Private Sub Workbook_BeforePrint(Cancel As Boolean)

End Sub

Bob Umlas
Excel MVP
 

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