Blocking the print option

msh666

New Member
Joined
Feb 19, 2004
Messages
2
Hello

Please can you help.

The company I work for STILL use Excel 97. I have been asked to update a spreadsheet as the original author if not available. As no one knows what the original passowrd for this sheet was I have had to re-do the spreadsheet from the beginning. The spreadsheet if a kind of statement where certain parts have to be deleted depending upon the circumstances.

The problem I have is that the original author programmed the worksheet to prevent it from being printed unless certain rows of text were delete first. In this case if was either rows 39 thru 44 combined or rows 46 & 47 combined. When you clicked th PRINT button or selected FILE/PRINT an error message appears to say 'YOU MUST DELETE ROWS 39 thru 44 or 46 & 47 BEFORE YOU CAN PRINT'. How can I set up the new spreadsheet that I have done to do this.

o_O :confused:
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
L

Legacy 21301

Guest
Right click on the protected sheet tab and select View Code.

In the left-side of the window that appears, click ThisWorkbook and the code you need should appear in the right-side of he window under :-

Private Sub Workbook_BeforePrint(Cancel As Boolean)
 
Upvote 0

Forum statistics

Threads
1,187,175
Messages
5,962,039
Members
438,578
Latest member
MrJimC

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top