Hiding Cells fore print layout

Jordan2000

Registered User.
Local time
Today, 12:14
Joined
Nov 4, 2004
Messages
24
Hello,

I am having a problem I have a few repports in excel and those have some sensitive data dat never ever is allowd to make a hard copy.
i protected the sheets against selecting and copy. but no I need to protect a smal range of the repport to be protected against printing.

like the rows 55 to 65 is not allowd but the rapportage is in the range 1 to 100 so how can i do this ?

it may be visible on the screen but when making a hard copy to the printer it is not allowd to do.. for that range so that range need to be blanked out.
 
Howdy. You can use a workbook event in VBA (BeforePrint) so that you could hide rows 55:66 before print. Something like this:

Code:
Private Sub Workbook_BeforePrint(Cancel As Boolean)
    Rows("8:20").EntireRow.Hidden = True
End Sub

To enter this code in the proper place, go to the XL icon to the left of the File menu, right-click and choose "View Code"
________
GT80
 
Last edited:
Hi, Jordan2000,

maybe Invisible Ink could be of good use.

Ciao,
Holger
 
hiding columns for printing only

Is there a way to hide the columns only during printing, and have them show up again after the spreadsheet is printed?
 
Hi, Stacey,

I would prefer a normal printing job to the workbook-event whioch should be disabkled (Cancel = True) as that will not allow to determine if the printing really has been done or not. (only to my limited knowledge).

Ciao,
Holger
 

Users who are viewing this thread

Back
Top Bottom