View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default Hiding "0" rows in printing.

And another try for the syntax :-)
Private Sub Workbook_BeforePrint(Cancel As Boolean)

Frank

Bob Phillips wrote:
"Peter Atherton" wrote in message
...
Wahab

If you want this to work on one sheet put it in the sheet
code module (right-click sheet nametab, View code)


BeforePrint is not a worksheet event, it has to go in as a workbook
event.


put it in the Workbook module to work on more than one
sheet.

Sub Before_print()


The correct syntax is

Private Sub Workbook_Before(Cancel As Boolean)