Protecting Headers and Footers!!

  • Thread starter Thread starter Raja
  • Start date Start date
R

Raja

When I protect the worksheet it does protect most of the formatting and
inserting and deleting rows and columns.

I want to protect my workseet in such a way that user cannot go to View >
Headers / Footers or File Page set up and change the Headers and Footers!!

Is it possible? how do I do this setting?
 
Hi,

A bit drastic maybe but you could do this, You would need to re-enable it at
some point; probably workbook close by changing False to True. This does
however depend on macros being enabled which may not be the case.

Private Sub Workbook_Open()
With Application.CommandBars("Worksheet Menu Bar")
With .Controls("&View")
.Controls("&Header and Footer...").Enabled = False
End With
End With
End Sub


Mike
 
I don't think you can protect this.

If it's really important, you could put code into the workbook_Beforeprint event
that makes sure the headers/footers are what you want.

But that would fail if the user disabled macros or even disabled events.
 
Back
Top