Thread: print property
View Single Post
  #2   Report Post  
Bob Umlas
 
Posts: n/a
Default

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

"cwwolfdog" wrote in message
...
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,