Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Before Print Event or not? 1

Status
Not open for further replies.

williekay

Technical User
Jun 30, 2003
121
0
0
US
I have an excel document that takes a long time to print. The solution is to open the document in page break view, print the document, and return to normal view. I do this usually with a Macro and the Macro works but the Macro placed in the ThisWorkbook section does not???

Code:
[ul]
  [li]Private Sub Workbook_BeforePrint(Cancel As Boolean) [/li]
  [li]ActiveWindow.View = xlPageBreakPreview [/li]
[li]ActiveWindow.SelectedSheets.PrintOut Copies:=1,[/li]
[li]Collate:=True   [/li]

 [li] ActiveWindow.View = xlNormalView[/li]

[li]End Sub[/li]

[/ul]

Willie
 
You will probably get a better response if you repost your question in forum707.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top