#1   Report Post  
cwwolfdog
 
Posts: n/a
Default print property

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,


  #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,




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
set the print area print multiple tabs veng Excel Discussion (Misc queries) 5 February 12th 05 07:01 PM
Printing - Have to set print area 1 column further than necessary STUART BISSET Excel Discussion (Misc queries) 0 January 24th 05 07:59 PM
Read Text File into Excel Using VBA Willie T Excel Discussion (Misc queries) 13 January 8th 05 12:37 AM
Microsoft Excel could not find anything to print cyndi Excel Discussion (Misc queries) 1 December 22nd 04 01:40 PM
Non-Breaking Space + Print Issue Barb Reinhardt Charts and Charting in Excel 3 December 9th 04 01:03 AM


All times are GMT +1. The time now is 12:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"