Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 130
Default Block Printing of sheet

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.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Block Printing of 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

"Shu of AZ" wrote:

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.

Reply
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
how to delete the little red arrow in excell work sheet block earledawg Excel Worksheet Functions 1 May 29th 08 02:09 PM
Insert A Block of Data Into Another Sheet Dasha New Users to Excel 2 November 4th 07 04:23 PM
Printing rows in 1 block Sam Vanderstraeten Excel Discussion (Misc queries) 2 July 25th 05 02:53 PM
Block an area of sheet from Printing? lbbss Excel Discussion (Misc queries) 4 June 8th 05 07:21 PM
Block an area of sheet from Printing? lbbss Setting up and Configuration of Excel 4 June 8th 05 07:21 PM


All times are GMT +1. The time now is 10:16 PM.

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

About Us

"It's about Microsoft Excel"