protect format - page setup

K

kva

I've protected parts of my sheet, but also want to protect it's format. I
don't want the user to use page setup to alter the appearance. Any
suggestions?
 
D

Dave Peterson

I don't think you can stop them.

But you could use the workbook_beforeprint event to put things back to what you
want.

Option Explicit
Private Sub Workbook_BeforePrint(Cancel As Boolean)

With Worksheets("sheet1").PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
.PrintArea = ""
.LeftHeader = ""
.CenterHeader = ""
'.etc....
End With

End Sub

This kind of code goes into the ThisWorkbook module.

(I'd just record a macro when I set it exactly the way I want. Then paste that
code into that module--and adjust the Activesheet references.)

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
 
Top