View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
RAFAAJ2000[_2_] RAFAAJ2000[_2_] is offline
external usenet poster
 
Posts: 75
Default How to prevent a specific worksheet from being printed !

Hi all,

I have used the following code but this assumes the specific WorkSheet is
the active WorkSheet which is not necessarly always the case.

Private Sub Workbook_BeforePrint(Cancel As Boolean)
If ActiveSheet.Name = "Sheet1" Then
MsgBox " Printing Cancelled!"
Cancel = True
End If
End Sub


Any ideas ?

Regards.