LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 219
Default Beforeprint not executing

I'm missing something simple. I have the following code in ThisWorkbook:

Private Sub Workbook_BeforePrint(Cancel As Boolean)

ActiveSheet.PageSetup.PrintArea = ActiveCell.CurrentRegion.Address

End Sub

But it's not happening, just prints the selected cell instead of the
Current Region. An Edit Goto Current Region selects the correct Current
Region. I copied the code from an online tutorial, and read a reviewed the
VBA Help, and can't figure out what's wrong. I'm in Win2000, XL2003.
Anybody see what I'm missing?

TIA
 
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
BeforePrint robzrob Excel Programming 0 December 14th 09 10:37 PM
BeforePrint joeeng Excel Programming 1 November 7th 08 11:17 AM
BeforePrint Robin Clay Excel Programming 4 February 13th 07 03:48 PM
ADO 2.7 & ADO 2.8 beforeprint JCanyoneer Excel Programming 7 March 30th 05 04:05 PM
Help with BeforePrint Eric[_7_] Excel Programming 2 October 9th 03 07:44 PM


All times are GMT +1. The time now is 01:34 AM.

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

About Us

"It's about Microsoft Excel"