Block Printing of sheet

  • Thread starter Thread starter Shu of AZ
  • Start date Start date
S

Shu of AZ

I have two worksheets, sheet1 and sheet2. Is there code to block sheet1 from
printing without having to place the print area in some distant cell and
protect the sheet.
 
Hi,

Alt + F11 to open VB editor. Double Click 'This Workbook' and paste this in
on the right

Private Sub Workbook_BeforePrint(Cancel As Boolean)
If ActiveSheet.Name = ("Sheet1") Then
MsgBox "You cannot print this sheet"
Cancel = True
End If
End Sub

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top