View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
keepITcool keepITcool is offline
external usenet poster
 
Posts: 2,253
Default How to prevent a specific worksheet from being printed !

set the printarea for the sheet to an empty range?


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


RAFAAJ2000 wrote :

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.